Ejemplo n.º 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());
     }
 }
Ejemplo n.º 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());
            }
        }