< Summary

Information
Class: Services.ApiServices.ArmtekApi.ArmtekBySupplierConnector
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/ArmtekApi/ArmtekBySupplierConnector.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 23
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
get_ProviderKey()100%210%
get_DisplayName()100%210%
get_DefaultCurrencyCode()100%210%
get_SiteUrl()100%210%
PingAsync()0%620%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/ArmtekApi/ArmtekBySupplierConnector.cs

#LineLine coverage
 1using Services.ApiServices.ApiSupplierIntegration;
 2
 3namespace Services.ApiServices.ArmtekApi;
 4
 5public sealed class ArmtekBySupplierConnector : IApiSupplierConnector
 6{
 7    private readonly ArmtekByDataManager _client;
 8
 09    public ArmtekBySupplierConnector(ArmtekByDataManager client) => _client = client;
 10
 011    public string ProviderKey => "ArmtekBy";
 012    public string DisplayName => "Армтек BY";
 013    public string DefaultCurrencyCode => "BYN";
 014    public string SiteUrl => "https://ws.armtek.ru/";
 15
 16    public async Task<ApiSupplierPingResult> PingAsync(CancellationToken cancellationToken = default)
 17    {
 018        var response = await _client.PingAsync(cancellationToken);
 019        return response.HasErrors
 020            ? new ApiSupplierPingResult(false, "Армтек BY вернул ошибку авторизации или доступа.")
 021            : new ApiSupplierPingResult(true);
 022    }
 23}