public void TestHashCodeInequality() { Account account1 = TestObjectBuilder.GetAccount1(); Account account2 = TestObjectBuilder.GetAccount2(); Assert.AreNotEqual(account1.GetHashCode(), account2.GetHashCode()); }
public void TestInequality() { Account account1 = TestObjectBuilder.GetAccount1(); Account account2 = TestObjectBuilder.GetAccount2(); Assert.AreNotEqual(account1, account2); }
public void TestEqualityWithNullProperties() { Account account1 = TestObjectBuilder.GetAccountWithNullProperties(); Account account2 = TestObjectBuilder.GetAccount1(); try { bool isEqual = account1.Equals(account2); isEqual = account2.Equals(account1); } catch (Exception ex) { Assert.Fail("An exception was thrown when testing equality: " + ex.ToString()); } }