예제 #1
0
        public void XmlCompareConstrainsEqualsWithDifferentOrder()
        {
            var expected = XmlSamples.GetContent("elements");
            var actual   = XmlSamples.GetContent("elements-with-different-order");

            Assert.That(
                expected,
                IsXml.Equals(actual).UseAnalizer(XmlAnalyzer.Custom().SetEqual(XmlComparisonType.NodeListSequence)));
        }
예제 #2
0
        public void XmlCompareConstrainWithXsdReference()
        {
            var actual   = XmlSamples.GetContent("with-xsd-reference");
            var expected = XmlSamples.GetContent("with-xsd-another-reference");

            Assert.That(
                expected,
                IsXml.Equals(actual)
                .UseAnalizer(XmlAnalyzer.Custom().SetEqual(XmlComparisonType.SchemaLocation)));
        }
예제 #3
0
        public void XmlCompareConstrainCustomAnalyzerIgnoreNodeMissing()
        {
            var expected = XmlSamples.GetContent("elements");
            var actual   = XmlSamples.GetContent("elements-with-comment");

            Assert.That(
                expected,
                IsXml.Equals(actual)
                .WithIgnoreComment(false)
                .UseAnalizer(XmlAnalyzer.Custom()
                             .SetEqual(XmlComparisonType.NodeList)
                             .SetEqual(XmlComparisonType.NodeListLookup)));
        }