< Summary

Information
Class: ValidateLib.Metadata.PropertyParsers.DataType.MaxExclusivePropertyParser
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\DataType\MaxExclusivePropertyParser.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 26
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

MethodBlocks covered Blocks not covered
MaxExclusivePropertyParser(...)20
ParseProperty(...)139

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\DataType\MaxExclusivePropertyParser.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2using ValidateLib.ErrorsAndWarnings.Warnings;
 3using ValidateLib.Metadata.Descriptors;
 4
 5namespace ValidateLib.Metadata.PropertyParsers.DataType
 6{
 7    internal class MaxExclusivePropertyParser : PropertyParserBase<DatatypeDescriptor>, IPropertyParser<DatatypeDescript
 8    {
 19        public MaxExclusivePropertyParser(List<Warning> warnings, DatatypeDescriptor descriptor) : base(warnings, descri
 10        {
 111        }
 12
 13        public void ParseProperty(JProperty property)
 14        {
 115            Descriptor.IsBuiltIn = false;
 116            if (property.Value.Type != JTokenType.String && property.Value.Type != JTokenType.Integer && property.Value.
 17            {
 018                Warnings.Add(WarningFactory.GetValueConstraintWrongValueWarning(property.Value, property.Name));
 19            }
 20            else
 21            {
 122                Descriptor.maxExclusive = new Properties.AtomicProperties.AtomicPropertyString(property.Value.ToString()
 23            }
 124        }
 25    }
 26}