Skip to content

Commit d6a9d90

Browse files
authored
WiFi credentials file for unit tests is now added through a template (#270)
***NO_CI***
1 parent 03d59f2 commit d6a9d90

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!WiFi.cs

tests/WebServerE2ETests/WebServerE2ETests.nfproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,10 @@
7373
<ProjectConfigurationsDeclaredAsItems />
7474
</ProjectCapabilities>
7575
</ProjectExtensions>
76+
<Target Name="CopyWiFiTemplate" Condition="!Exists('$(MSBuildProjectDirectory)\WiFi.cs')" BeforeTargets="BeforeBuild">
77+
<ItemGroup>
78+
<WIFI_TEMPLATE Include="$(MSBuildProjectDirectory)\Template\WiFi.cs"/>
79+
</ItemGroup>
80+
<Copy SourceFiles="@(WIFI_TEMPLATE)" DestinationFolder="$(MSBuildProjectDirectory)" />
81+
</Target>
7682
</Project>

tests/WebServerE2ETests/WiFi.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace WebServerE2ETests
5+
{
6+
public partial class Program
7+
{
8+
private const string Ssid = "yourSSID";
9+
private const string Password = "YourPassword";
10+
11+
}
12+
}

0 commit comments

Comments
 (0)