diff --git a/GameList.Tests/AuthTests.cs b/GameList.Tests/AuthTests.cs index 88eb1c1..5314df7 100644 --- a/GameList.Tests/AuthTests.cs +++ b/GameList.Tests/AuthTests.cs @@ -18,7 +18,7 @@ public class AuthTests response.EnsureSuccessStatusCode(); var json = await response.Content.ReadFromJsonAsync(); - Assert.True(json.GetProperty("IsAdmin").GetBoolean()); + Assert.True(json.GetProperty("isAdmin").GetBoolean()); } [Fact] diff --git a/GameList.Tests/ResultsTests.cs b/GameList.Tests/ResultsTests.cs index d209e41..c18b60e 100644 --- a/GameList.Tests/ResultsTests.cs +++ b/GameList.Tests/ResultsTests.cs @@ -29,7 +29,7 @@ public class ResultsTests Assert.True(results.GetArrayLength() >= 1); var first = results[0]; - Assert.Equal("ResultGame", first.GetProperty("Name").GetString()); - Assert.Equal(8, (int)first.GetProperty("Average").GetDouble()); + Assert.Equal("ResultGame", first.GetProperty("name").GetString()); + Assert.Equal(8, (int)first.GetProperty("average").GetDouble()); } } diff --git a/GameList.Tests/StateTests.cs b/GameList.Tests/StateTests.cs index 40fe535..03efc6d 100644 --- a/GameList.Tests/StateTests.cs +++ b/GameList.Tests/StateTests.cs @@ -39,7 +39,7 @@ public class StateTests var state = await player.GetFromJsonAsync("/api/state"); - Assert.Equal((int)Phase.Results, state.GetProperty("CurrentPhase").GetInt32()); + Assert.Equal(Phase.Results.ToString(), state.GetProperty("currentPhase").GetString()); Assert.True(state.GetProperty("resultsOpen").GetBoolean()); } } diff --git a/GameList.Tests/Support/StubHttpClientFactory.cs b/GameList.Tests/Support/StubHttpClientFactory.cs index 98de9fa..766fc6a 100644 --- a/GameList.Tests/Support/StubHttpClientFactory.cs +++ b/GameList.Tests/Support/StubHttpClientFactory.cs @@ -13,6 +13,6 @@ internal class StubHttpClientFactory : IHttpClientFactory public HttpClient CreateClient(string name) { - return new HttpClient(_handler, dispose: false); + return new HttpClient(_handler, disposeHandler: false); } } diff --git a/GameList.Tests/Support/TestClientExtensions.cs b/GameList.Tests/Support/TestClientExtensions.cs index bce91e4..d4f1532 100644 --- a/GameList.Tests/Support/TestClientExtensions.cs +++ b/GameList.Tests/Support/TestClientExtensions.cs @@ -41,6 +41,6 @@ internal static class TestClientExtensions response.EnsureSuccessStatusCode(); var json = await response.Content.ReadFromJsonAsync(); - return json.GetProperty("Id").GetInt32(); + return json.GetProperty("id").GetInt32(); } } diff --git a/GameList.Tests/VoteTests.cs b/GameList.Tests/VoteTests.cs index c34536b..10a7b32 100644 --- a/GameList.Tests/VoteTests.cs +++ b/GameList.Tests/VoteTests.cs @@ -52,8 +52,9 @@ public class VoteTests vote.EnsureSuccessStatusCode(); var mine = await player.GetFromJsonAsync>("/api/votes/mine"); + Assert.NotNull(mine); - Assert.Equal(2, mine.Count); + Assert.Equal(2, mine!.Count); Assert.All(mine, v => Assert.Equal(9, v.Score)); } diff --git a/GameList.csproj b/GameList.csproj index 3e5e966..8f9b63f 100644 --- a/GameList.csproj +++ b/GameList.csproj @@ -14,4 +14,10 @@ + + + + + +