< Summary

Information
Class: OzonDomains.Models.ArmtekCartItem
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/ArmtekCartItem.cs
Line coverage
96%
Covered lines: 25
Uncovered lines: 1
Coverable lines: 26
Total lines: 50
Line coverage: 96.1%
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
get_Id()100%11100%
get_ProviderKey()100%11100%
get_StudioOrderId()100%11100%
get_ActiveStudioOrderId()100%11100%
get_StudioOrder()100%210%
get_ArtId()100%11100%
get_Pin()100%11100%
get_Brand()100%11100%
get_Keyzak()100%11100%
get_WarehouseName()100%11100%
get_PartnerWarehouseCode()100%11100%
get_ProductName()100%11100%
get_BuyerKunnr()100%11100%
get_DeliveryAddressKunnr()100%11100%
get_DeliveryAddressName()100%11100%
get_Quantity()100%11100%
get_SourcePrice()100%11100%
get_CurrencyCode()100%11100%
get_DeliveryAtUtc()100%11100%
get_Status()100%11100%
get_TestResultJson()100%11100%
get_LastError()100%11100%
get_TestedAtUtc()100%11100%
get_CreatedBy()100%11100%
get_CreatedAtUtc()100%11100%
get_UpdatedAtUtc()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/ArmtekCartItem.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6[Table("ArmtekCartItems")]
 7public sealed class ArmtekCartItem
 8{
 249    public long Id { get; set; }
 5110    [Required, MaxLength(20)] public string ProviderKey { get; set; } = string.Empty;
 3011    public int StudioOrderId { get; set; }
 12    /// <summary>Заполняется, пока строка может участвовать в корзине; уникальный индекс защищает от дубля.</summary>
 2613    public int? ActiveStudioOrderId { get; set; }
 014    public Order? StudioOrder { get; set; }
 5315    [Required, MaxLength(40)] public string ArtId { get; set; } = string.Empty;
 5516    [Required, MaxLength(40)] public string Pin { get; set; } = string.Empty;
 5317    [Required, MaxLength(80)] public string Brand { get; set; } = string.Empty;
 1218    [MaxLength(40)] public string? Keyzak { get; set; }
 419    [MaxLength(80)] public string? WarehouseName { get; set; }
 720    [MaxLength(40)] public string? PartnerWarehouseCode { get; set; }
 421    [MaxLength(120)] public string? ProductName { get; set; }
 22    /// <summary>KUNRG заказа Armtek: покупатель, под которым выполнялась проценка (связь склада отгрузки).</summary>
 1323    [MaxLength(10)] public string? BuyerKunnr { get; set; }
 24    /// <summary>KUNZA заказа Armtek: адрес доставки, под которым выполнялась проценка.</summary>
 1425    [MaxLength(10)] public string? DeliveryAddressKunnr { get; set; }
 26    /// <summary>Человекочитаемый адрес на момент добавления: getUserInfo может не ответить при оформлении.</summary>
 327    [MaxLength(200)] public string? DeliveryAddressName { get; set; }
 1928    public decimal Quantity { get; set; }
 1329    public decimal? SourcePrice { get; set; }
 3230    [MaxLength(8)] public string CurrencyCode { get; set; } = "RUB";
 831    public DateTime? DeliveryAtUtc { get; set; }
 5232    [Required, MaxLength(30)] public string Status { get; set; } = ArmtekCartItemStatus.Pending;
 433    public string? TestResultJson { get; set; }
 334    [MaxLength(1000)] public string? LastError { get; set; }
 835    public DateTime? TestedAtUtc { get; set; }
 236    [MaxLength(450)] public string? CreatedBy { get; set; }
 2437    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 2838    public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
 39}
 40
 41public static class ArmtekCartItemStatus
 42{
 43    public const string Pending = "Pending";
 44    public const string Ready = "Ready";
 45    public const string Processing = "Processing";
 46    public const string Ordered = "Ordered";
 47    public const string Failed = "Failed";
 48    public const string Removed = "Removed";
 49    public static readonly string[] Active = [Pending, Ready, Processing, Failed];
 50}