< Summary

Information
Class: ValidateLib.Metadata.PropertyParsers.DataType.Format.DecimalCharPropertyParser
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\DataType\Format\DecimalCharPropertyParser.cs
Line coverage
57%
Covered lines: 4
Uncovered lines: 3
Coverable lines: 7
Total lines: 26
Line coverage: 57.1%
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
DecimalCharPropertyParser(...)20
ParseProperty(...)89

File(s)

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

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2using ValidateLib.ErrorsAndWarnings.Warnings;
 3using ValidateLib.Metadata.Descriptors;
 4
 5namespace ValidateLib.Metadata.PropertyParsers.DataType.Format
 6{
 7    internal class DecimalCharPropertyParser : PropertyParserBase<FormatDescriptor>, IPropertyParser<FormatDescriptor>
 8    {
 19        public DecimalCharPropertyParser(List<Warning> warnings, FormatDescriptor? descriptor = null) : base(warnings, d
 10        {
 111        }
 12
 13        public void ParseProperty(JProperty property)
 14        {
 115            if (property.Value.Type == JTokenType.String)
 16            {
 117                Descriptor.decimalChar = property.Value.ToString();
 18            }
 19            else
 20            {
 021                Warnings.Add(
 022                   WarningFactory.GetStringPropertyWrongValueWarning(property.Value, property.Name, property.Value.Type.
 23            }
 024        }
 25    }
 26}