< Summary

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

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\TableGroup\TablesPropertyParser.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2using ValidateLib.ErrorsAndWarnings.Errors;
 3using ValidateLib.ErrorsAndWarnings.Warnings;
 4using ValidateLib.Metadata.Descriptors;
 5using ValidateLib.Metadata.Parsers;
 6
 7namespace ValidateLib.Metadata.PropertyParsers.TableGroup
 8{
 9    public class TablesPropertyParser : PropertyParserBase<TableGroupDescriptor>, IPropertyParser<TableGroupDescriptor>
 10    {
 111        public TablesPropertyParser(List<Warning> warnings, TableGroupDescriptor? descriptor = null) : base(warnings, de
 12        {
 113        }
 14
 15        public void ParseProperty(JProperty property)
 16        {
 117            var arrrayProeprtyParser = new ArrayPropertyParser<TableDescriptor>(Warnings);
 118            var tablesProperty = arrrayProeprtyParser.ParseJToken(property);
 119            if (tablesProperty?._value?.Count == 0) ErrorFactory.ThrowZeroTablesInTablesError();
 120            Descriptor.tables = tablesProperty;
 121        }
 22    }
 23}