Skip to content

Commit 78ad2cb

Browse files
Merge pull request #101 from CodebreakerApp/100-libs-dotnet8
100 libs dotnet8
2 parents d1ab6c3 + 8b2288a commit 78ad2cb

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

src/clients/common/Codebreaker.GameAPIs.Client.Tests/Codebreaker.GameAPIs.Client.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0-preview.6.23329.7" />
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
1515
<PackageReference Include="Moq" Version="4.18.4" />
16-
<PackageReference Include="xunit" Version="2.5.0" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
16+
<PackageReference Include="xunit" Version="2.6.3" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
<PrivateAssets>all</PrivateAssets>
2020
</PackageReference>

src/clients/common/Codebreaker.GameAPIs.Client.Tests/TestGamesClient.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
namespace Codebreaker.GameAPIs.Client.Tests;
44

5-
public class TestGamesClient(ITestOutputHelper outputHelper)
5+
public class TestGamesClient
66
{
7-
private readonly ITestOutputHelper _outputHelper = outputHelper;
8-
97
[Fact]
108
public async Task TestStartGame6x4Async()
119
{
@@ -46,20 +44,20 @@ public async Task TestStartGame6x4Async()
4644

4745
HttpClient httpClient = new(handlerMock.Object)
4846
{
49-
BaseAddress = new System.Uri(configMock.Object["GameAPIs"] ?? throw new InvalidOperationException())
47+
BaseAddress = new Uri(configMock.Object["GameAPIs"] ?? throw new InvalidOperationException())
5048
};
5149

5250
var gamesClient = new GamesClient(httpClient, NullLogger<GamesClient>.Instance);
5351

5452
// Act
55-
var response = await gamesClient.StartGameAsync(Models.GameType.Game6x4, "test");
53+
var (GameId, NumberCodes, MaxMoves, FieldValues) = await gamesClient.StartGameAsync(Models.GameType.Game6x4, "test");
5654

5755
// Assert
58-
Assert.Equal(4, response.NumberCodes);
59-
Assert.Equal(12, response.MaxMoves);
60-
Assert.Single(response.FieldValues.Keys);
61-
Assert.Equal("colors", response.FieldValues.Keys.First());
62-
Assert.Equal(6, response.FieldValues["colors"].Length);
56+
Assert.Equal(4, NumberCodes);
57+
Assert.Equal(12, MaxMoves);
58+
Assert.Single(FieldValues.Keys);
59+
Assert.Equal("colors", FieldValues.Keys.First());
60+
Assert.Equal(6, FieldValues["colors"].Length);
6361

6462
handlerMock.Protected().Verify(
6563
"SendAsync",

src/clients/common/Codebreaker.GameAPIs.Client/Codebreaker.GameAPIs.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</ItemGroup>
2828

2929
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
30-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0-rc.2.23479.6" />
30+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
3131
</ItemGroup>
3232

3333
</Project>

0 commit comments

Comments
 (0)