< Summary

Information
Class: OzonDomains.Models.ShateMCartItem
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/ShateMCartItem.cs
Line coverage
91%
Covered lines: 21
Uncovered lines: 2
Coverable lines: 23
Total lines: 41
Line coverage: 91.3%
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_StudioOrderId()100%11100%
get_ActiveStudioOrderId()100%11100%
get_StudioOrder()100%210%
get_PriceId()100%11100%
get_Article()100%11100%
get_Brand()100%11100%
get_ProductName()100%11100%
get_LocationCode()100%11100%
get_Direction()100%11100%
get_AgreementCode()100%11100%
get_DeliveryAddressCode()100%11100%
get_DeliveryType()100%11100%
get_DeliveryAtUtc()100%11100%
get_ExternalBasketItemId()100%11100%
get_Quantity()100%11100%
get_SourcePrice()100%11100%
get_CurrencyCode()100%11100%
get_Status()100%11100%
get_LastError()100%210%
get_CreatedBy()100%11100%
get_CreatedAtUtc()100%11100%
get_UpdatedAtUtc()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6[Table("ShateMCartItems")]
 7public sealed class ShateMCartItem
 8{
 229    public long Id { get; set; }
 3910    public int StudioOrderId { get; set; }
 4411    public int? ActiveStudioOrderId { get; set; }
 012    public Order? StudioOrder { get; set; }
 3913    [Required, MaxLength(512)] public string PriceId { get; set; } = string.Empty;
 2814    [MaxLength(120)] public string Article { get; set; } = string.Empty;
 2815    [MaxLength(256)] public string Brand { get; set; } = string.Empty;
 416    [MaxLength(200)] public string? ProductName { get; set; }
 417    [MaxLength(80)] public string? LocationCode { get; set; }
 318    [MaxLength(120)] public string? Direction { get; set; }
 219    [MaxLength(80)] public string? AgreementCode { get; set; }
 220    [MaxLength(80)] public string? DeliveryAddressCode { get; set; }
 221    [MaxLength(40)] public string? DeliveryType { get; set; }
 222    public DateTime? DeliveryAtUtc { get; set; }
 3623    [MaxLength(120)] public string? ExternalBasketItemId { get; set; }
 724    public decimal Quantity { get; set; }
 725    public decimal? SourcePrice { get; set; }
 2826    [Required, MaxLength(8)] public string CurrencyCode { get; set; } = "BYN";
 7127    [Required, MaxLength(30)] public string Status { get; set; } = ShateMCartItemStatus.Pending;
 028    [MaxLength(1000)] public string? LastError { get; set; }
 329    [MaxLength(450)] public string? CreatedBy { get; set; }
 2230    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 3331    public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
 32}
 33
 34public static class ShateMCartItemStatus
 35{
 36    public const string Pending = "Pending";
 37    public const string Ordered = "Ordered";
 38    public const string Failed = "Failed";
 39    public const string Removed = "Removed";
 40    public static readonly string[] Active = [Pending, Failed];
 41}