Skip to content

Commit 82fa097

Browse files
committed
Replaced test config file with env var.
1 parent 414920b commit 82fa097

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

Medium.Tests/Client.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Client
1515

1616
public Client() {
1717
var configuration = new ConfigurationBuilder().
18-
AddJsonFile("config.json").
18+
AddEnvironmentVariables("MEDIUMSDK_").
1919
Build();
2020
_accessToken = configuration["AccessToken"];
2121
_testPublicationId = configuration["TestPublicationId"];

Medium.Tests/Medium.Tests.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,15 @@
1010
<IsPackable>False</IsPackable>
1111
</PropertyGroup>
1212

13-
<ItemGroup>
14-
<None Update="config.json">
15-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16-
</None>
17-
</ItemGroup>
18-
1913
<ItemGroup>
2014
<ProjectReference Include="..\Medium\Medium.csproj" />
2115
</ItemGroup>
2216

2317
<ItemGroup>
18+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
2419
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
2520
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
2621
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.2" />
27-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
2822
<PackageReference Include="xunit" Version="2.2.0" />
2923
</ItemGroup>
3024

Medium.Tests/config.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)