コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        public void XmlValidationSimpleTest()
        {
            var document = XmlSamples.GetContent("ns");

            Assert.That(document, IsXml.Valid());
        }
コード例 #4
0
        public void XmlValidationConstraintWithDocumentsSchema()
        {
            var document = XmlSamples.GetContent("with-xsd-reference");

            Assert.That(document, IsXml.Valid().WithDocumentSchemas());
        }