예제 #1
0
        public void TestHashCodeInequality()
        {
            AccountCollection accountCol1 = TestObjectBuilder.GetAccountCollection();
            AccountCollection accountCol2 = TestObjectBuilder.GetAccountCollection2();

            Assert.AreNotEqual(accountCol1.GetHashCode(), accountCol2.GetHashCode());
        }
예제 #2
0
        public void TestGetHashCodeWithNoAccounts()
        {
            AccountCollection collection = TestObjectBuilder.GetAccountCollectionWithNoAccounts();

            try
            {
                int hashCode = collection.GetHashCode();
            }
            catch (Exception ex)
            {
                Assert.Fail("There was an exception when generating a hash code for a collection with no accounts:  " + ex.ToString());
            }
        }