< Summary

Information
Class: ValidateLib.ErrorsAndWarnings.Errors.Specific.CommonPropertyValueError
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\ErrorsAndWarnings\Errors\Specific\CommonPropertyValueError.cs
Line coverage
42%
Covered lines: 6
Uncovered lines: 8
Coverable lines: 14
Total lines: 31
Line coverage: 42.8%
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

MethodBlocks covered Blocks not covered
CommonPropertyValueError(...)20
CommonPropertyValueError(...)20
GetMessage(...)026

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\ErrorsAndWarnings\Errors\Specific\CommonPropertyValueError.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2using System.Globalization;
 3using ValidateLib.Metadata.Properties;
 4
 5namespace ValidateLib.ErrorsAndWarnings.Errors.Specific
 6{
 7    public class CommonPropertyValueError : Error
 8    {
 9        CommonProperty? commonProperty;
 10        JProperty? jProperty;
 111        public CommonPropertyValueError(CommonProperty commonProperty)
 12        {
 113            this.commonProperty = commonProperty;
 114        }
 115        public CommonPropertyValueError(JProperty jProperty)
 16        {
 117            this.jProperty = jProperty;
 118        }
 19        public override string GetMessage(CultureInfo cultureInfo)
 20        {
 021            return GetMessageWithParams
 022                (
 023                nameof(CommonPropertyValueError),
 024                cultureInfo,
 025                ErrorInfo?.tableDescriptor?.url?._value,
 026                commonProperty is null ? jProperty?.Name?.ToString() : commonProperty?.IRI,
 027                commonProperty?._value
 028                );
 29        }
 30    }
 31}