< Summary

Information
Class: OzonDomains.Models.OrderControlTask
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/OrderControlTask.cs
Line coverage
85%
Covered lines: 18
Uncovered lines: 3
Coverable lines: 21
Total lines: 42
Line coverage: 85.7%
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_RuleId()100%11100%
get_Rule()100%11100%
get_OrderId()100%11100%
get_Order()100%11100%
get_DeduplicationKey()100%11100%
get_Status()100%11100%
get_Priority()100%11100%
get_TargetAppRoleId()100%11100%
get_TargetAppRole()100%210%
get_ClaimedByUserId()100%11100%
get_ClaimedAtUtc()100%210%
get_WarningAtUtc()100%11100%
get_DueAtUtc()100%11100%
get_EscalatedAtUtc()100%210%
get_ClosedAtUtc()100%11100%
get_ClosedByUserId()100%11100%
get_CloseReason()100%11100%
get_SnapshotJson()100%11100%
get_CreatedAtUtc()100%11100%
get_UpdatedAtUtc()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3using OzonDomains.Models.Authorization;
 4
 5namespace OzonDomains.Models;
 6
 7[Table("OrderControlTasks")]
 8public class OrderControlTask
 9{
 62210    public long Id { get; set; }
 32811    public int RuleId { get; set; }
 65312    public OrderControlRule? Rule { get; set; }
 33113    public int OrderId { get; set; }
 98014    public Order? Order { get; set; }
 66315    [Required, MaxLength(160)] public string DeduplicationKey { get; set; } = string.Empty;
 128716    [Required, MaxLength(30)] public string Status { get; set; } = OrderControlTaskStatus.Open;
 30517    public int Priority { get; set; }
 63318    public int TargetAppRoleId { get; set; }
 019    public AppRole? TargetAppRole { get; set; }
 120    [MaxLength(450)] public string? ClaimedByUserId { get; set; }
 021    public DateTime? ClaimedAtUtc { get; set; }
 32822    public DateTime WarningAtUtc { get; set; }
 65423    public DateTime DueAtUtc { get; set; }
 024    public DateTime? EscalatedAtUtc { get; set; }
 325    public DateTime? ClosedAtUtc { get; set; }
 226    [MaxLength(450)] public string? ClosedByUserId { get; set; }
 427    [MaxLength(500)] public string? CloseReason { get; set; }
 30528    public string? SnapshotJson { get; set; }
 66229    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 66430    public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
 31}
 32
 33public static class OrderControlTaskStatus
 34{
 35    public const string Open = "Open";
 36    public const string InProgress = "InProgress";
 37    public const string Completed = "Completed";
 38    public const string Closed = "Closed";
 39    public const string Overdue = "Overdue";
 40    public const string Removed = "Removed";
 41    public static readonly string[] Active = [Open, InProgress, Overdue];
 42}