diff --git a/tests/ReC.Tests/Client/CommonApiTests.cs b/tests/ReC.Tests/Client/CommonApiTests.cs index 794d42e..26e2624 100644 --- a/tests/ReC.Tests/Client/CommonApiTests.cs +++ b/tests/ReC.Tests/Client/CommonApiTests.cs @@ -51,7 +51,7 @@ public class CommonApiTests : RecClientTestBase } [Test] - public void UpdateAsync_with_body_payload_throws_or_completes() + public async Task UpdateAsync_with_body_payload_throws_or_completes() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -64,7 +64,7 @@ public class CommonApiTests : RecClientTestBase try { - client.Common.UpdateAsync(payload).GetAwaiter().GetResult(); + await client.Common.UpdateAsync(payload); Assert.Pass("Update completed."); } catch (ReCApiException ex) @@ -75,7 +75,7 @@ public class CommonApiTests : RecClientTestBase } [Test] - public void DeleteAsync_sends_payload_as_query_string() + public async Task DeleteAsync_sends_payload_as_query_string() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -90,7 +90,7 @@ public class CommonApiTests : RecClientTestBase try { - client.Common.DeleteAsync(payload).GetAwaiter().GetResult(); + await client.Common.DeleteAsync(payload); } catch (ReCApiException ex) { diff --git a/tests/ReC.Tests/Client/EndpointAuthApiTests.cs b/tests/ReC.Tests/Client/EndpointAuthApiTests.cs index 98bf082..f5a77bd 100644 --- a/tests/ReC.Tests/Client/EndpointAuthApiTests.cs +++ b/tests/ReC.Tests/Client/EndpointAuthApiTests.cs @@ -66,7 +66,7 @@ public class EndpointAuthApiTests : RecClientTestBase } [Test] - public void DeleteAsync_sends_payload_as_query_string() + public async Task DeleteAsync_sends_payload_as_query_string() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -80,7 +80,7 @@ public class EndpointAuthApiTests : RecClientTestBase try { - client.EndpointAuth.DeleteAsync(payload).GetAwaiter().GetResult(); + await client.EndpointAuth.DeleteAsync(payload); } catch (ReCApiException ex) { diff --git a/tests/ReC.Tests/Client/EndpointParamsApiTests.cs b/tests/ReC.Tests/Client/EndpointParamsApiTests.cs index 08ff6b8..3a0c55f 100644 --- a/tests/ReC.Tests/Client/EndpointParamsApiTests.cs +++ b/tests/ReC.Tests/Client/EndpointParamsApiTests.cs @@ -69,7 +69,7 @@ public class EndpointParamsApiTests : RecClientTestBase } [Test] - public void DeleteAsync_sends_payload_as_query_string() + public async Task DeleteAsync_sends_payload_as_query_string() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -83,7 +83,7 @@ public class EndpointParamsApiTests : RecClientTestBase try { - client.EndpointParams.DeleteAsync(payload).GetAwaiter().GetResult(); + await client.EndpointParams.DeleteAsync(payload); } catch (ReCApiException ex) { diff --git a/tests/ReC.Tests/Client/EndpointsApiTests.cs b/tests/ReC.Tests/Client/EndpointsApiTests.cs index 4f3c536..f549c3e 100644 --- a/tests/ReC.Tests/Client/EndpointsApiTests.cs +++ b/tests/ReC.Tests/Client/EndpointsApiTests.cs @@ -66,7 +66,7 @@ public class EndpointsApiTests : RecClientTestBase } [Test] - public void DeleteAsync_sends_payload_as_query_string() + public async Task DeleteAsync_sends_payload_as_query_string() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -80,7 +80,7 @@ public class EndpointsApiTests : RecClientTestBase try { - client.Endpoints.DeleteAsync(payload).GetAwaiter().GetResult(); + await client.Endpoints.DeleteAsync(payload); } catch (ReCApiException ex) { diff --git a/tests/ReC.Tests/Client/ProfileApiTests.cs b/tests/ReC.Tests/Client/ProfileApiTests.cs index 442795f..30a8e60 100644 --- a/tests/ReC.Tests/Client/ProfileApiTests.cs +++ b/tests/ReC.Tests/Client/ProfileApiTests.cs @@ -69,7 +69,7 @@ public class ProfileApiTests : RecClientTestBase } [Test] - public void UpdateAsync_with_unknown_id_throws_or_completes() + public async Task UpdateAsync_with_unknown_id_throws_or_completes() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -82,7 +82,7 @@ public class ProfileApiTests : RecClientTestBase try { - client.Profiles.UpdateAsync(long.MaxValue, payload).GetAwaiter().GetResult(); + await client.Profiles.UpdateAsync(long.MaxValue, payload); Assert.Pass("Update completed."); } catch (ReCApiException ex) @@ -93,7 +93,7 @@ public class ProfileApiTests : RecClientTestBase } [Test] - public void DeleteAsync_sends_payload_as_query_string() + public async Task DeleteAsync_sends_payload_as_query_string() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -107,7 +107,7 @@ public class ProfileApiTests : RecClientTestBase try { - client.Profiles.DeleteAsync(payload).GetAwaiter().GetResult(); + await client.Profiles.DeleteAsync(payload); } catch (ReCApiException ex) { diff --git a/tests/ReC.Tests/Client/RecActionApiTests.cs b/tests/ReC.Tests/Client/RecActionApiTests.cs index 4ab41e2..4bb05ce 100644 --- a/tests/ReC.Tests/Client/RecActionApiTests.cs +++ b/tests/ReC.Tests/Client/RecActionApiTests.cs @@ -158,7 +158,7 @@ public class RecActionApiTests : RecClientTestBase } [Test] - public void DeleteAsync_sends_payload_as_query_string_not_body() + public async Task DeleteAsync_sends_payload_as_query_string_not_body() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -172,7 +172,7 @@ public class RecActionApiTests : RecClientTestBase try { - client.RecActions.DeleteAsync(payload).GetAwaiter().GetResult(); + await client.RecActions.DeleteAsync(payload); } catch (ReCApiException ex) { diff --git a/tests/ReC.Tests/Client/ResultApiTests.cs b/tests/ReC.Tests/Client/ResultApiTests.cs index d58d9a6..a0ad676 100644 --- a/tests/ReC.Tests/Client/ResultApiTests.cs +++ b/tests/ReC.Tests/Client/ResultApiTests.cs @@ -57,7 +57,7 @@ public class ResultApiTests : RecClientTestBase } [Test] - public void CreateAsync_with_invalid_action_reference_throws_or_completes() + public async Task CreateAsync_with_invalid_action_reference_throws_or_completes() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -73,7 +73,7 @@ public class ResultApiTests : RecClientTestBase try { - client.Results.CreateAsync(payload).GetAwaiter().GetResult(); + await client.Results.CreateAsync(payload); Assert.Pass("Create completed."); } catch (ReCApiException ex) @@ -84,7 +84,7 @@ public class ResultApiTests : RecClientTestBase } [Test] - public void UpdateAsync_with_unknown_id_throws_or_completes() + public async Task UpdateAsync_with_unknown_id_throws_or_completes() { var (client, scope) = CreateScopedClient(); using var _ = scope; @@ -96,7 +96,7 @@ public class ResultApiTests : RecClientTestBase try { - client.Results.UpdateAsync(long.MaxValue, payload).GetAwaiter().GetResult(); + await client.Results.UpdateAsync(long.MaxValue, payload); Assert.Pass("Update completed."); } catch (ReCApiException ex)