< Summary

Information
Class: ValidateLib.Metadata.PropertyParsers.Reference.ResourcePropertyParser
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\Reference\ResourcePropertyParser.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
ResourcePropertyParser(...)20
ParseProperty(...)112

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\PropertyParsers\Reference\ResourcePropertyParser.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 ResourcePropertyParser : PropertyParserBase<ReferenceDescriptor>, IPropertyParser<ReferenceDescriptor
 10    {
 111        public ResourcePropertyParser(List<Warning> warnings, ReferenceDescriptor descriptor) : base(warnings, descripto
 12        {
 113        }
 14
 15        public void ParseProperty(JProperty property)
 16        {
 117            var linkPropertyParser = new LinkPropertyParser(Warnings);
 118            var resourcePropertyValue = linkPropertyParser.ParseJToken(property.Value, property.Name);
 119            Descriptor.resource = resourcePropertyValue;
 120            if (Descriptor.schemaReference != null) ErrorFactory.ThrowResourceAndSchemaReferencePresentError(property.To
 121        }
 22    }
 23}