public void XmlValidationConstraintSchemaWithNamespaceTest() { var document = XmlSamples.GetContent("ns"); var emptyNamespaceSchemaPath = XmlSamples.GetFullPathByName(@"Xsd/ns.xsd"); var namespaceSchemaPath = XmlSamples.GetFullPathByName(@"Xsd/ns_app1.xsd"); string nameSpace = @"http://example.org"; Assert.That(document, IsXml.Valid().WithSchema(emptyNamespaceSchemaPath).WithSchema(nameSpace, namespaceSchemaPath)); }
public void XmlValidationConstraintTextReaderSchema() { var document = XmlSamples.GetContent("ns-without-namespace"); var namespaceSchemaPath = XmlSamples.GetFullPathByName(@"Xsd/ns-without-namespace.xsd"); Assert.That( document, IsXml.Valid().WithSchema(namespaceSchemaPath)); }