Beispiel #1
0
        public void CanParseEvidence()
        {
            var evidenceParser = new DefinitionParser <EvidenceDefinition>(EvidenceDefinition.Create);

            var definition = evidenceParser.ParseString(
                @"    
                medway: composite (
                    competent-status : enum ( 'Yes', 'No' ),
                    consent-given-by : string,
                    consent-taken-by : string
                )
            ");

            definition.Should().BeEquivalentTo(
                EvidenceDefinition.Create(
                    "medway",
                    new CompositeDefinitionType(
                        EvidenceDefinition.Create("competent-status", new EnumDefinitionType("Yes", "No")),
                        EvidenceDefinition.Create("consent-given-by", new StringDefinitionType()),
                        EvidenceDefinition.Create("consent-taken-by", new StringDefinitionType())
                        ))
                );
        }
Beispiel #2
0
 /// <inheritdoc />
 public ImportFileEvidenceGenerator(IEnumerable <EvidenceDefinition> evidenceDefinitions)
 {
     definition = evidenceDefinitions.FirstOrDefault(_ => _.SystemName == "import-file");
 }