public void Diff_with_null_pathExpected_should_throw_exception() { var actual = new NodeComment(123, 456, "Text"); var expected = new NodeComment(123, 456, "Text"); actual.Diff(expected, XmlPathRoot.Strict.Empty, null, XmlOptions.Strict.Value); }
public void Diff_equal_with_same_index() { var actual = new NodeComment(123, 456, "Text"); var expected = new NodeComment(123, 456, "Text"); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value); Assert.IsTrue(diff.IsEmpty); }
public void Diff_with_items_differing_by_type() { var actual = new NodeComment(123, 456, "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.UnexpectedComment, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Actual)); }
public void Diff_with_value_differing_by_case() { var actual = new NodeComment(123, 456, "Text"); var expected = new NodeComment(123, 456, "TEXT"); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value); AssertDiff(diff, new Diff(DiffType.MismatchedComment, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Both)); }
public void Diff_with_items_differing_by_type() { var actual = new NodeComment(123, 456, "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.UnexpectedComment, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Actual)); }