< Summary

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

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\Reference\SchemaReferencePropertyParser.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.Reference
 8{
 9    internal class SchemaReferencePropertyParser : PropertyParserBase<ReferenceDescriptor>, IPropertyParser<ReferenceDes
 10    {
 111        public SchemaReferencePropertyParser(List<Warning> warnings, ReferenceDescriptor descriptor) : base(warnings, de
 12        {
 113        }
 14
 15        //
 16        public void ParseProperty(JProperty property)
 17        {
 118            var linkPropertyParser = new LinkPropertyParser(Warnings);
 119            var schemaReferenceValue = linkPropertyParser.ParseJToken(property.Value, property.Name);
 120            Descriptor.schemaReference = schemaReferenceValue;
 121            if (Descriptor.resource != null) ErrorFactory.ThrowResourceAndSchemaReferencePresentError(property.ToString(
 122        }
 23    }
 24}