public void DocumentEquality() { XDoc x = new XDoc("x").Elem("a", "1").Elem("b", "2"); XDoc y = new XDoc("x").Elem("a", "1").Elem("b", "2"); XDoc z = new XDoc("x").Elem("a", "1").Elem("b", "3"); XDoc null1 = null; XDoc null2 = null; Assert.IsTrue(x.Equals(y)); Assert.IsFalse(x.Equals(z)); Assert.IsTrue(x == y); Assert.IsFalse(x == z); Assert.IsTrue(x != z); Assert.IsFalse(x != y); Assert.IsFalse(x.Equals(null1)); Assert.IsFalse(x == null1); Assert.IsFalse(null1 == x); Assert.IsTrue(x != null1); Assert.IsTrue(null1 != x); Assert.IsTrue(null1 == null2); Assert.IsTrue(null1 == null); Assert.IsFalse(null1 != null2); Assert.IsFalse(null1 != null); }
public static void AreEqual(XDoc expected, XDoc actual) { NUnit.Framework.Assert.IsTrue(expected.Equals(actual)); }
public static void AreEqual(XDoc expected, XDoc actual, string message) { NUnit.Framework.Assert.IsTrue(expected.Equals(actual), message); }