< Summary

Information
Class: Services.ApiServices.MotexApi.MotexDataManager
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/MotexApi/MotexDataManager.cs
Line coverage
62%
Covered lines: 5
Uncovered lines: 3
Coverable lines: 8
Total lines: 21
Line coverage: 62.5%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
PingAsync(...)100%210%
GetAsync(...)100%11100%
SearchAsync(...)100%210%
CreateOrderAsync(...)100%11100%
GetOrderDetailsAsync(...)100%11100%
GetOrdersByDateRangeAsync(...)100%210%
GetOrdersByIdsAsync(...)100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/MotexApi/MotexDataManager.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2
 3namespace Services.ApiServices.MotexApi;
 4
 5/// <summary>Белый список только read-операций Motex API.</summary>
 6public sealed class MotexDataManager
 7{
 8    private readonly MotexHttpClient _client;
 989    public MotexDataManager(MotexHttpClient client) => _client = client;
 10
 011    public Task<JToken> PingAsync(CancellationToken ct = default) => _client.GetAsync("/api/v1/Ping", null, ct);
 2412    public Task<JToken> GetAsync(string path, IReadOnlyDictionary<string, string?>? query, CancellationToken ct = defaul
 013    public Task<JToken> SearchAsync(string path, JToken body, CancellationToken ct = default) => _client.PostAsync(path,
 1014    public Task<JToken> CreateOrderAsync(JObject request, CancellationToken ct = default) => _client.PostAsync("/api/v1/
 15    public Task<JToken> GetOrderDetailsAsync(string? id, string? clientOrderNum, CancellationToken ct = default) =>
 416        _client.GetAsync("/api/v1/Orders/GetOrderDetails", new Dictionary<string, string?> { ["id"] = id, ["clientOrderN
 17    public Task<JToken> GetOrdersByDateRangeAsync(string? dateFrom, string? dateTo, string? status, int pageNumber, int 
 018        _client.GetAsync("/api/v1/Orders/GetOrdersByDateRange", new Dictionary<string, string?> { ["dateFrom"] = dateFro
 19    public Task<JToken> GetOrdersByIdsAsync(IReadOnlyCollection<string> orderIds, CancellationToken ct = default) =>
 220        _client.PostAsync("/api/v1/Orders/GetOrdersByIds", new JObject { ["orderIds"] = new JArray(orderIds) }, ct);
 21}