示例#1
0
 public void TestGetHashCodeWithNullProperties()
 {
     try
     {
         Credential cred     = TestObjectBuilder.GetCredentialWithNullProperties();
         int        hashCode = cred.GetHashCode();
     }
     catch (Exception ex)
     {
         Assert.Fail("An exception was thrown when generating a hash code:  " + ex.ToString());
     }
 }
示例#2
0
        public void TestEqualityCheckWithNullProperties()
        {
            Credential cred1 = TestObjectBuilder.GetCredentialWithNullProperties();
            Credential cred2 = TestObjectBuilder.GetCredential1();

            try
            {
                bool isEqual = cred1.Equals(cred2);
                isEqual = cred2.Equals(cred1);
            }
            catch (Exception ex)
            {
                Assert.Fail("An exception was thrown when testing equality:  " + ex.ToString());
            }
        }