public void CompareNames_Different_ShouldFail() { XElement root1 = XElement.Parse(@"<Root />"); XElement root2 = XElement.Parse(@"<Root2 />"); Assert.IsFalse(XmlCompare.CompareNames(root1, root2).AreSame); }
public void CompareNames_DifferentNameSpace_ShouldFail() { XElement root1 = XElement.Parse(@"<Root xmlns='http://www.northwind.com'> <Child>1</Child></Root>"); XElement root2 = XElement.Parse(@"<n:Root xmlns:n='http://www.northwind2.com'><n:Child>1</n:Child></n:Root>"); Assert.IsFalse(XmlCompare.CompareNames(root1, root2).AreSame); }
public void CompareNames_Same_ShouldSucceed() { XElement root1 = XElement.Parse(@"<Root />"); XElement root2 = XElement.Parse(@"<Root />"); Assert.IsTrue(XmlCompare.CompareNames(root1, root2).AreSame); }