Refactor: Rename GetDynamicAsync to GetAsync
Renamed `GetDynamicAsync` to `GetAsync` across `ProfileApi.cs`, `RecActionApi.cs`, and `ResultApi.cs` to improve consistency and align with naming conventions for asynchronous methods. Updated XML documentation to clarify that the non-generic `GetAsync` overload returns a dynamically deserialized payload, typically a `System.Text.Json.JsonElement`. Highlighted its relation to the generic `GetAsync<T>` method. Adjusted method signatures for both `NETFRAMEWORK` and non-`NETFRAMEWORK` code paths. Updated test files (`ProfileApiTests.cs`, `RecActionApiTests.cs`, and `ResultApiTests.cs`) to reflect the renaming, including test method names and assertions. These changes enhance code readability, maintainability, and consistency.
This commit is contained in:
@@ -38,14 +38,14 @@ public class ResultApiTests : RecClientTestBase
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task GetDynamicAsync_without_filters_returns_dynamic_payload_or_throws_not_found()
|
||||
public async Task GetAsync_non_generic_returns_dynamic_payload_or_throws_not_found()
|
||||
{
|
||||
var (client, scope) = CreateScopedClient();
|
||||
using var _ = scope;
|
||||
|
||||
try
|
||||
{
|
||||
dynamic results = await client.Results.GetDynamicAsync();
|
||||
dynamic? results = await client.Results.GetAsync();
|
||||
Assert.That(results, Is.Not.Null);
|
||||
Assert.That(results, Is.TypeOf<JsonElement>());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user