< Summary

Information
Class: Services.LabelServices.LabelRequest
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/LabelServices/LabelRequest.cs
Line coverage
87%
Covered lines: 7
Uncovered lines: 1
Coverable lines: 8
Total lines: 19
Line coverage: 87.5%
Branch coverage
25%
Covered branches: 1
Total branches: 4
Branch coverage: 25%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Article()100%11100%
get_Producer()100%11100%
get_ProductName()100%11100%
get_Quantity()100%11100%
get_CleanedArticle()50%22100%
get_ProductNameWithProducer()0%620%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/LabelServices/LabelRequest.cs

#LineLine coverage
 1using System.Text.RegularExpressions;
 2
 3namespace Services.LabelServices;
 4
 5public class LabelRequest
 6{
 287    public string Article { get; set; } = string.Empty;
 88    public string Producer { get; set; } = string.Empty;
 129    public string ProductName { get; set; } = string.Empty;
 810    public int Quantity { get; set; }
 11
 12    /// <summary>Артикул без спецсимволов — только буквы и цифры — для штрихкода.</summary>
 13    public string CleanedArticle =>
 814        string.IsNullOrEmpty(Article)
 815            ? string.Empty
 816            : Regex.Replace(Article, @"[^a-zA-Zа-яА-Я0-9]", "");
 17
 018    public string ProductNameWithProducer => string.IsNullOrWhiteSpace(Producer) ? ProductName : Producer + " " + Produc
 19}