Пример #1
0
        public void ParserComparesUnEqual()
        {
            var parser = new UnorderedNodeParser();
            var xmlA   = parser.Parse(XmlReader.Create(new StringReader(XmlA)));
            var xmlC   = parser.Parse(XmlReader.Create(new StringReader(XmlC)));

            Assert.That(xmlA, Is.Not.EqualTo(xmlC));
        }
Пример #2
0
 public void ElementsWithDifferentNameShouldNotCompareEqual()
 {
     using (var readerA = new StringReader(XmlA))
         using (var readerB = new StringReader(XmlB))
             using (var xmlReaderA = XmlReader.Create(readerA))
                 using (var xmlReaderB = XmlReader.Create(readerB))
                 {
                     var a = _unorderedNodeParser.Parse(xmlReaderA);
                     var b = _unorderedNodeParser.Parse(xmlReaderB);
                     Assert.That(a, Is.Not.EqualTo(b));
                 }
 }
Пример #3
0
        public void FuzzingHasNoEffectOnUnorderedNodeParser()
        {
            var xml    = XDocument.Parse(XmlA);
            var fuzzed = new XmlFuzzer().Fuzz(xml);
            var parser = new UnorderedNodeParser();

            using (var reader = xml.CreateReader())
            {
                var source = parser.Parse(reader);
                using (var fuzzedReader = fuzzed.CreateReader())
                {
                    var fuzz = parser.Parse(fuzzedReader);
                    Assert.That(source, Is.EqualTo(fuzz));
                }
            }
        }
Пример #4
0
 public void FuzzingHasNoEffectOnUnorderedNodeParser()
 {
     var xml = XDocument.Parse(XmlA);
     var fuzzed = new XmlFuzzer().Fuzz(xml);
     var parser = new UnorderedNodeParser();
     using (var reader = xml.CreateReader())
     {
         var source = parser.Parse(reader);
         using (var fuzzedReader = fuzzed.CreateReader())
         {
             var fuzz = parser.Parse(fuzzedReader);
             Assert.That(source, Is.EqualTo(fuzz));
         }
     }
 }
Пример #5
0
 public void ParserComparesUnEqual()
 {
     var parser = new UnorderedNodeParser();
     var xmlA = parser.Parse(XmlReader.Create(new StringReader(XmlA)));
     var xmlC = parser.Parse(XmlReader.Create(new StringReader(XmlC)));
     Assert.That(xmlA, Is.Not.EqualTo(xmlC));
 }