< Summary

Information
Class: ValidateLib.Metadata.PropertyParsers.DIalect.QuoteCharPropertyParser
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\DIalect\QuoteCharPropertyParser.cs
Line coverage
88%
Covered lines: 8
Uncovered lines: 1
Coverable lines: 9
Total lines: 27
Line coverage: 88.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
QuoteCharPropertyParser(...)20
ParseProperty(...)244

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\DIalect\QuoteCharPropertyParser.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    internal class QuoteCharPropertyParser : PropertyParserBase<DialectDescriptor>, IPropertyParser<DialectDescriptor>
 9    {
 110        public QuoteCharPropertyParser(List<Warning> warnings, DialectDescriptor descriptor) : base(warnings, descriptor
 11        {
 112        }
 13
 14        public void ParseProperty(JProperty property)
 15        {
 116            if (property.Value.Type == JTokenType.Null)
 017                Descriptor.quoteChar = new AtomicPropertyString(null);
 118            else if (property.Value.Type == JTokenType.String)
 119                Descriptor.quoteChar = new AtomicPropertyString(property.Value.ToString());
 20            else
 21            {
 122                Warnings.Add(WarningFactory.GetQuoteCharWrongValueWarning(property.Value.ToString(), property.Value.Type
 123                Descriptor.quoteChar = new AtomicPropertyString("\"");
 24            }
 125        }
 26    }
 27}