[Test] public void EqualsWithDifferentFiles() { Error E1 = new Error(File1, "Error"); Error E2 = new Error(File2, "Error"); Assert.IsFalse(E1.Equals(E2), "Error.Equals does not return false for errors with differing files"); }
[Test] public void Equals() { Error E1 = new Error(File1, "Error"); Error E2 = new Error(File1, "Error"); Assert.IsTrue(E1.Equals(E2), "Error.Equals does not return true for identical errors"); }
[Test] public void EqualsWithDifferentMessages() { Error E1 = new Error(File1, "Error"); Error E2 = new Error(File1, "Warning"); Assert.IsFalse(E1.Equals(E2), "Error.Equals does not return false for errors with differing descriptions"); }
private void TestDeepEquals(Error objectA, Error objectB, bool expect, bool expectDeep) { Assert.AreEqual(expectDeep, objectA.DeepEquals(objectB)); Assert.AreEqual(expectDeep, objectB.DeepEquals(objectA)); Assert.AreEqual(expect, objectA.Equals(objectB)); Assert.AreEqual(expect, objectB.Equals(objectA)); }