< Summary

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

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\TopLevelObject\DialectPropertyParser.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2using ValidateLib.ErrorsAndWarnings.Warnings;
 3using ValidateLib.Metadata.Descriptors;
 4using ValidateLib.Metadata.Parsers;
 5using ValidateLib.Metadata.Properties;
 6
 7namespace ValidateLib.Metadata.PropertyParsers.TopLevelObject
 8{
 9    public class DialectPropertyParser : PropertyParserBase<TopLevelObjectDescriptor>, IPropertyParser<TopLevelObjectDes
 10    {
 111        public DialectPropertyParser(List<Warning> warnings, TopLevelObjectDescriptor descriptor) : base(warnings, descr
 12        {
 113        }
 14
 15
 16        public void ParseProperty(JProperty property)
 17        {
 118            var dialectParser = new DialectParser(Warnings);
 119            var dialectDescriptor = dialectParser.ParseJToken(property.Value, property.Name);
 120            if (!dialectDescriptor.IsInvalid)
 121                Descriptor.dialect = new ObjectProperty<DialectDescriptor>(dialectDescriptor);
 122        }
 23
 24    }
 25}