public void WhenUsingTheXmlReaderApproach_ToSupplyASchema_TypesFromImportsAreNotResolved() { // arrange var validator = new Schematron.Validator(); // act, (assert) Xunit.Assert.Throws <XmlSchemaException>(() => validator.AddSchema(XmlReader.Create(XsdWithPartialSchemaLocation))); }
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); }