< Summary

Information
Line coverage
69%
Covered lines: 9
Uncovered lines: 4
Coverable lines: 13
Total lines: 27
Line coverage: 69.2%
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_Code()100%11100%
get_Description()100%11100%
get_Details()100%11100%
get_Type()100%11100%
.ctor(...)100%11100%
AddDetail(...)100%210%
AddDetails(...)100%210%

File(s)

/home/runner/work/dom.mediator/dom.mediator/Dom.Mediator/Models/Error.cs

#LineLine coverage
 1public record ErrorDetail(string field, string message);
 2
 3public class Error
 4{
 305    public string Code { get; init; } = string.Empty;
 306    public string Description { get; init; } = string.Empty;
 7
 108    public List<ErrorDetail> Details { get; } = new List<ErrorDetail>();
 189    public string Type { get; init; }
 10
 1011    public Error(string code, string description, string type)
 12    {
 1013        Code = code;
 1014        Description = description;
 1015        Type = type;
 1016    }
 17
 18    public void AddDetail(string errorCode, string errorMessage)
 19    {
 020        Details.Add(new ErrorDetail(errorCode, errorMessage));
 021    }
 22
 23    public void AddDetails(List<ErrorDetail> validation)
 24    {
 025        Details.AddRange(validation);
 026    }
 27}