< Summary

Information
Class: OzonDomains.Models.MlAutoCartItem
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/MlAutoCartItem.cs
Line coverage
45%
Covered lines: 10
Uncovered lines: 12
Coverable lines: 22
Total lines: 42
Line coverage: 45.4%
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_Pin()100%11100%
get_Brand()100%11100%
get_StorageCode()100%210%
get_WarehouseName()100%210%
get_ProductName()100%210%
get_DeliveryAddressId()100%210%
get_DeliveryAddressName()100%210%
get_Quantity()100%11100%
get_SourcePrice()100%210%
get_CurrencyCode()100%11100%
get_DeliveryAtUtc()100%210%
get_Status()100%11100%
get_TestResultJson()100%210%
get_LastError()100%210%
get_TestedAtUtc()100%210%
get_CreatedBy()100%210%
get_CreatedAtUtc()100%11100%
get_UpdatedAtUtc()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6[Table("MlAutoCartItems")]
 7public sealed class MlAutoCartItem
 8{
 49    public long Id { get; set; }
 410    public int StudioOrderId { get; set; }
 411    public int? ActiveStudioOrderId { get; set; }
 012    public Order? StudioOrder { get; set; }
 813    [Required, MaxLength(60)] public string Pin { get; set; } = string.Empty;
 814    [Required, MaxLength(100)] public string Brand { get; set; } = string.Empty;
 015    [MaxLength(80)] public string? StorageCode { get; set; }
 016    [MaxLength(160)] public string? WarehouseName { get; set; }
 017    [MaxLength(200)] public string? ProductName { get; set; }
 018    [MaxLength(50)] public string? DeliveryAddressId { get; set; }
 019    [MaxLength(300)] public string? DeliveryAddressName { get; set; }
 420    public decimal Quantity { get; set; }
 021    public decimal? SourcePrice { get; set; }
 422    [MaxLength(8)] public string CurrencyCode { get; set; } = "BYN";
 023    public DateTime? DeliveryAtUtc { get; set; }
 824    [Required, MaxLength(30)] public string Status { get; set; } = MlAutoCartItemStatus.Pending;
 025    public string? TestResultJson { get; set; }
 026    [MaxLength(1000)] public string? LastError { get; set; }
 027    public DateTime? TestedAtUtc { get; set; }
 028    [MaxLength(450)] public string? CreatedBy { get; set; }
 429    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 630    public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
 31}
 32
 33public static class MlAutoCartItemStatus
 34{
 35    public const string Pending = "Pending";
 36    public const string Ready = "Ready";
 37    public const string Processing = "Processing";
 38    public const string Ordered = "Ordered";
 39    public const string Failed = "Failed";
 40    public const string Removed = "Removed";
 41    public static readonly string[] Active = [Pending, Ready, Processing, Failed];
 42}