public void Diff_with_null_pathExpected_should_throw_exception() { var actual = new NodeElement(123, 123, "Name", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); var expected = new NodeElement(123, 123, "Name", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); actual.Diff(expected, XmlPathRoot.Strict.Empty, null, XmlOptions.Strict.Value); }
public void Diff_with_items_differing_by_type() { var actual = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); var expected = MockRepository.GenerateStub <INode>(); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value); AssertDiff(diff, new Diff(DiffType.UnexpectedElement, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Actual)); }
public void Diff_equal_with_item_differing_by_name_case() { var actual = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); var expected = new NodeElement(123, 456, "NAME", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Custom.IgnoreElementsNameCase.Value); Assert.IsTrue(diff.IsEmpty); }
public void Diff_with_item_differing_by_name_case() { var actual = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); var expected = new NodeElement(123, 456, "NAME", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value); AssertDiff(diff, new Diff(DiffType.MismatchedElement, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Both)); }
public void Diff_equal_with_same_index() { var actual = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); var expected = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray <INode> .Instance); 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 NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var expected = MockRepository.GenerateStub<INode>(); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value); AssertDiff(diff, new Diff(DiffType.UnexpectedElement, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Actual)); }
public void Diff_equal_with_item_differing_by_name_case() { var actual = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var expected = new NodeElement(123, 456, "NAME", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Custom.IgnoreElementsNameCase.Value); Assert.IsTrue(diff.IsEmpty); }
public void Diff_with_item_differing_by_name_case() { var actual = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var expected = new NodeElement(123, 456, "NAME", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value); AssertDiff(diff, new Diff(DiffType.MismatchedElement, XmlPathRoot.Strict.Empty.Element(123), DiffTargets.Both)); }
public void Diff_equal_with_same_index() { var actual = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var expected = new NodeElement(123, 456, "Name", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var diff = actual.Diff(expected, XmlPathRoot.Strict.Empty, XmlPathRoot.Strict.Empty, XmlOptions.Strict.Value); Assert.IsTrue(diff.IsEmpty); }
public void Diff_with_null_pathExpected_should_throw_exception() { var actual = new NodeElement(123, 123, "Name", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); var expected = new NodeElement(123, 123, "Name", NodeAttributeCollection.Empty, EmptyArray<INode>.Instance); actual.Diff(expected, XmlPathRoot.Strict.Empty, null, XmlOptions.Strict.Value); }