< Summary

Information
Class: OzonDomains.Models.MotexCartItem
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/MotexCartItem.cs
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 37
Line coverage: 100%
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%11100%
get_Code()100%11100%
get_Brand()100%11100%
get_ProductName()100%11100%
get_StoreCode()100%11100%
get_StoreInfo()100%11100%
get_Quantity()100%11100%
get_SourcePrice()100%11100%
get_CurrencyCode()100%11100%
get_DeliveryAtUtc()100%11100%
get_Status()100%11100%
get_LastError()100%11100%
get_CreatedBy()100%11100%
get_CreatedAtUtc()100%11100%
get_UpdatedAtUtc()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6[Table("MotexCartItems")]
 7public sealed class MotexCartItem
 8{
 469    public long Id { get; set; }
 7010    public int StudioOrderId { get; set; }
 5211    public int? ActiveStudioOrderId { get; set; }
 412    public Order? StudioOrder { get; set; }
 10613    [Required, MaxLength(120)] public string Code { get; set; } = string.Empty;
 10414    [Required, MaxLength(256)] public string Brand { get; set; } = string.Empty;
 915    [MaxLength(200)] public string? ProductName { get; set; }
 2416    [MaxLength(40)] public string? StoreCode { get; set; }
 917    [MaxLength(255)] public string? StoreInfo { get; set; }
 4518    public decimal Quantity { get; set; }
 2119    public decimal? SourcePrice { get; set; }
 6220    [Required, MaxLength(8)] public string CurrencyCode { get; set; } = "BYN";
 1121    public DateTime? DeliveryAtUtc { get; set; }
 11122    [Required, MaxLength(30)] public string Status { get; set; } = MotexCartItemStatus.Pending;
 1223    [MaxLength(1000)] public string? LastError { get; set; }
 924    [MaxLength(450)] public string? CreatedBy { get; set; }
 4325    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 5426    public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
 27}
 28
 29public static class MotexCartItemStatus
 30{
 31    public const string Pending = "Pending";
 32    public const string Processing = "Processing";
 33    public const string Ordered = "Ordered";
 34    public const string Failed = "Failed";
 35    public const string Removed = "Removed";
 36    public static readonly string[] Active = [Pending, Processing, Failed];
 37}