< Summary

Information
Class: Services.ApiServices.AvdApi.AvdOrder
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/AvdApi/AvdOrder.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 14
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_OrderId()100%11100%
get_OrderNumber()100%11100%
get_OrderDate()100%11100%
get_OrderInfo()100%11100%
get_SchetNumber()100%11100%
get_Items()100%11100%
get_Summa()100%22100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/AvdApi/AvdOrder.cs

#LineLine coverage
 1namespace Services.ApiServices.AvdApi;
 2
 3/// <summary>Строки GetOrders, сгруппированные по OrderId для человекочитаемого просмотра.</summary>
 4public sealed class AvdOrder
 5{
 816    public string OrderId { get; init; } = string.Empty;
 507    public string OrderNumber { get; init; } = string.Empty;
 388    public string OrderDate { get; init; } = string.Empty;
 359    public string OrderInfo { get; init; } = string.Empty;
 1810    public string? SchetNumber { get; init; }
 5711    public IReadOnlyList<AvdOrderItem> Items { get; init; } = Array.Empty<AvdOrderItem>();
 12    /// <summary>Сумма заказа: АВД в отдельных ответах передаёт цену только в DealerPrice.</summary>
 913    public decimal Summa => Items.Sum(x => (x.Price ?? x.DealerPrice ?? 0m) * (x.Quantity ?? 0m));
 14}