using Jugenddienst_Stunden.Interfaces; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Jugenddienst_Stunden.Infrastructure; internal sealed class NullApiClient : IApiClient { private readonly string _message; public NullApiClient(string message) => _message = message ?? "API nicht konfiguriert."; public Task GetAsync(string path, IDictionary? query = null, CancellationToken ct = default) => Task.FromException(new InvalidOperationException(_message)); public Task SendAsync(HttpMethod method, string path, object? body = null, IDictionary? query = null, CancellationToken ct = default) => Task.FromException(new InvalidOperationException(_message)); public Task DeleteAsync(string path, IDictionary? query = null, CancellationToken ct = default) => Task.FromException(new InvalidOperationException(_message)); }