public void TestGetHashCodeWithNullProperties() { Account account = TestObjectBuilder.GetAccountWithNullProperties(); try { int hashCode = account.GetHashCode(); } catch (Exception ex) { Assert.Fail("An exception was thrown when generating a hash code: " + ex.ToString()); } }
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()); } }