Beispiel #1
0
        public void WhenUsingTheXmlReaderApproach_ToSupplyASchema_TypesFromImportsAreNotResolved()
        {
            // arrange
            var validator = new Schematron.Validator();

            // act, (assert)
            Xunit.Assert.Throws <XmlSchemaException>(() => validator.AddSchema(XmlReader.Create(XsdWithPartialSchemaLocation)));
        }
Beispiel #2
0
        public void WhenUsingTheXmlSchemaSetBasedApproach_ToSupplyASchema_TypesFromImportsAreResolved()
        {
            // arrange
            var validator = new Schematron.Validator();

            var count = validator.XmlSchemas != null ? validator.XmlSchemas.Count : 0;

            // act, (assert)
            validator.AddSchema(TargetNamespace, XsdWithPartialSchemaLocation);

            Xunit.Assert.True(validator.Schemas.Count == count + 1);

            //var res = validator.Validate(XmlContentLocation);
        }