diff --git a/NEW/tests/JdeScoping.Client.Tests/Services/TestableApiClient.cs b/NEW/tests/JdeScoping.Client.Tests/Services/TestableApiClient.cs new file mode 100644 index 0000000..ad35e83 --- /dev/null +++ b/NEW/tests/JdeScoping.Client.Tests/Services/TestableApiClient.cs @@ -0,0 +1,30 @@ +using JdeScoping.Client.Services; +using JdeScoping.Core.ApiContracts.Results; + +namespace JdeScoping.Client.Tests.Services; + +/// +/// Test wrapper to expose protected ApiClientBase methods for unit testing. +/// +public class TestableApiClient : ApiClientBase +{ + public TestableApiClient(HttpClient httpClient) : base(httpClient) { } + + public new Task> GetAsync(string route, CancellationToken ct = default) + => base.GetAsync(route, ct); + + public new Task> PostAsync(string route, TBody body, CancellationToken ct = default) + => base.PostAsync(route, body, ct); + + public new Task> PostAsync(string route, CancellationToken ct = default) + => base.PostAsync(route, ct); + + public new Task> GetBytesAsync(string route, CancellationToken ct = default) + => base.GetBytesAsync(route, ct); + + public new Task> PostForBytesAsync(string route, TBody body, CancellationToken ct = default) + => base.PostForBytesAsync(route, body, ct); + + public new Task> PostMultipartAsync(string route, Stream fileStream, string fileName, CancellationToken ct = default) + => base.PostMultipartAsync(route, fileStream, fileName, ct); +}