< Summary

Information
Class: ValidateLib.Metadata.PropertyParsers.DIalect.SkipBlankRowsPropertyParser
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\DIalect\SkipBlankRowsPropertyParser.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 29
Line coverage: 100%
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
SkipBlankRowsPropertyParser(...)20
ParseProperty(...)210

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\DIalect\SkipBlankRowsPropertyParser.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2using ValidateLib.ErrorsAndWarnings.Warnings;
 3using ValidateLib.Metadata.Descriptors;
 4using ValidateLib.Metadata.Properties.AtomicProperties;
 5
 6namespace ValidateLib.Metadata.PropertyParsers.DIalect
 7{
 8
 9    internal class SkipBlankRowsPropertyParser : PropertyParserBase<DialectDescriptor>, IPropertyParser<DialectDescripto
 10    {
 111        public SkipBlankRowsPropertyParser(List<Warning> warnings, DialectDescriptor descriptor) : base(warnings, descri
 12        {
 113        }
 14
 15        public void ParseProperty(JProperty property)
 16        {
 117            if (property.Value.Type != JTokenType.Boolean)
 18            {
 119                Warnings.Add(WarningFactory.GetAtomicPropertyBoolWrongValueWarning(property.Value, property.Name, proper
 120                Descriptor.skipBlankRows = new AtomicPropertyBoolean(false);
 21            }
 22            else
 23            {
 124                bool boolValue = (bool)property.Value;
 125                Descriptor.skipBlankRows = new AtomicPropertyBoolean(boolValue);
 26            }
 127        }
 28    }
 29}