Пример #1
0
		[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");
		}
Пример #2
0
		[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");
		}
Пример #3
0
		[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");
		}
Пример #4
0
 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));
 }