diff --git a/src/Turnierplan.Adapter.Test.Functional/TurnierplanAdapterTest.cs b/src/Turnierplan.Adapter.Test.Functional/TurnierplanAdapterTest.cs index e7182ed7..b9ac62be 100644 --- a/src/Turnierplan.Adapter.Test.Functional/TurnierplanAdapterTest.cs +++ b/src/Turnierplan.Adapter.Test.Functional/TurnierplanAdapterTest.cs @@ -40,7 +40,7 @@ public async Task Turnierplan_Client_Works_As_Expected_With_Test_Server() var client = new TurnierplanClient(server.CreateClient(), options); - var tournaments = await client.GetTournaments(seedingResult.FolderId, TestContext.Current.CancellationToken); + var tournaments = await client.GetTournamentsAsync(seedingResult.FolderId, TestContext.Current.CancellationToken); tournaments.Should().BeEquivalentTo([ new TournamentHeader @@ -61,8 +61,8 @@ public async Task Turnierplan_Client_Works_As_Expected_With_Test_Server() } ]); - var tournament1 = await client.GetTournament(seedingResult.Tournament1Id, TestContext.Current.CancellationToken); - var tournament2 = await client.GetTournament(seedingResult.Tournament2Id, TestContext.Current.CancellationToken); + var tournament1 = await client.GetTournamentAsync(seedingResult.Tournament1Id, TestContext.Current.CancellationToken); + var tournament2 = await client.GetTournamentAsync(seedingResult.Tournament2Id, TestContext.Current.CancellationToken); tournament1.Should().BeEquivalentTo(new Tournament { @@ -345,7 +345,7 @@ public async Task Turnierplan_Client_Throws_Exception_When_Version_Does_Not_Matc var action = async () => { - _ = await client.GetTournament("x"); + _ = await client.GetTournamentAsync("x"); }; var actualVersion = System.Text.RegularExpressions.Regex.Replace(typeof(TurnierplanClient).Assembly.GetName().Version!.ToString(), @"\.0$", string.Empty); diff --git a/src/Turnierplan.Adapter/TurnierplanClient.cs b/src/Turnierplan.Adapter/TurnierplanClient.cs index 8ab9a591..700b67b4 100644 --- a/src/Turnierplan.Adapter/TurnierplanClient.cs +++ b/src/Turnierplan.Adapter/TurnierplanClient.cs @@ -72,7 +72,7 @@ public TurnierplanClient(TurnierplanClientOptions options) /// Thrown if the version of the server does not match the version of the Turnierplan.Adapter library. /// /// - public async Task GetTournament(string tournamentId, CancellationToken cancellationToken = default) + public async Task GetTournamentAsync(string tournamentId, CancellationToken cancellationToken = default) { var request = new HttpRequestMessage(HttpMethod.Get, $"/api/tournaments/{tournamentId}"); var response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false); @@ -80,7 +80,7 @@ public async Task GetTournament(string tournamentId, CancellationTok EnsureSuccessResponse(response); VerifyServerVersion(response); - return await Deserialize(response).ConfigureAwait(false); + return await DeserializeAsync(response).ConfigureAwait(false); } /// @@ -96,7 +96,7 @@ public async Task GetTournament(string tournamentId, CancellationTok /// Thrown if the version of the server does not match the version of the Turnierplan.Adapter library. /// /// - public async Task> GetTournaments(string folderId, CancellationToken cancellationToken = default) + public async Task> GetTournamentsAsync(string folderId, CancellationToken cancellationToken = default) { var query = new QueryBuilder { { "folderId", folderId } }; var request = new HttpRequestMessage(HttpMethod.Get, $"/api/tournaments{query}"); @@ -105,7 +105,7 @@ public async Task> GetTournaments(string folderId, Cancel EnsureSuccessResponse(response); VerifyServerVersion(response); - return await Deserialize>(response).ConfigureAwait(false); + return await DeserializeAsync>(response).ConfigureAwait(false); } /// @@ -165,7 +165,7 @@ private static void EnsureSuccessResponse(HttpResponseMessage response) } } - private static async Task Deserialize(HttpResponseMessage response) + private static async Task DeserializeAsync(HttpResponseMessage response) { var data = await response.Content.ReadFromJsonAsync(__serializerOptions).ConfigureAwait(false);