Ejemplo n.º 1
0
        public void Diff_with_null_pathExpected_should_throw_exception()
        {
            var actual   = new NodeContent(123, 123, "Text");
            var expected = new NodeContent(123, 123, "Text");

            actual.Diff(expected, XmlPathRoot.Strict.Empty, null, XmlOptions.Strict.Value);
        }
Ejemplo n.º 2
0
        public void Diff_equal_with_same_index()
        {
            var actual   = new NodeContent(123, 123, "Text");
            var expected = new NodeContent(123, 123, "Text");
            var diff     = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value);

            Assert.IsTrue(diff.IsEmpty);
        }
Ejemplo n.º 3
0
        public void Diff_with_items_differing_by_type()
        {
            var actual   = new NodeContent(123, 123, "TEXT");
            var expected = MockRepository.GenerateStub <INode>();
            var diff     = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value);

            AssertDiff(diff, new Diff(DiffType.UnexpectedContent, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Actual));
        }
Ejemplo n.º 4
0
        public void Diff_with_value_differing_by_case()
        {
            var actual   = new NodeContent(123, 123, "Text");
            var expected = new NodeContent(123, 123, "TEXT");
            var diff     = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value);

            AssertDiff(diff, new Diff(DiffType.MismatchedContent, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Both));
        }
Ejemplo n.º 5
0
        public void Diff_equal_ignoring_name_case()
        {
            var actual   = new NodeContent(123, 123, "Text");
            var expected = new NodeContent(123, 123, "TEXT");
            var diff     = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, Options.IgnoreElementsValueCase);

            Assert.IsTrue(diff.IsEmpty);
        }
Ejemplo n.º 6
0
 public void Diff_equal_with_same_index()
 {
     var actual = new NodeContent(123, 123, "Text");
     var expected = new NodeContent(123, 123, "Text");
     var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value);
     Assert.IsTrue(diff.IsEmpty);
 }
Ejemplo n.º 7
0
 public void Diff_with_null_pathExpected_should_throw_exception()
 {
     var actual = new NodeContent(123, 123, "Text");
     var expected = new NodeContent(123, 123, "Text");
     actual.Diff(expected, XmlPathRoot.Strict.Empty, null, XmlOptions.Strict.Value);
 }
Ejemplo n.º 8
0
 public void Diff_with_items_differing_by_type()
 {
     var actual = new NodeContent(123, 123, "TEXT");
     var expected = MockRepository.GenerateStub<INode>();
     var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value);
     AssertDiff(diff, new Diff(DiffType.UnexpectedContent, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Actual));
 }
Ejemplo n.º 9
0
 public void Diff_with_value_differing_by_case()
 {
     var actual = new NodeContent(123, 123, "Text");
     var expected = new NodeContent(123, 123, "TEXT");
     var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value);
     AssertDiff(diff, new Diff(DiffType.MismatchedContent, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Both));
 }
Ejemplo n.º 10
0
 public void Diff_equal_ignoring_name_case()
 {
     var actual = new NodeContent(123, 123, "Text");
     var expected = new NodeContent(123, 123, "TEXT");
     var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, Options.IgnoreElementsValueCase);
     Assert.IsTrue(diff.IsEmpty);
 }