Example #1
0
 public void TestOverrides()
 {
     Product product = new Product() { Id = TestId, Name = TestName };
     Assert.IsNotNull(product.GetHashCode(), "Expected a hash code");
     Assert.IsTrue(product.Equals(new Product() { Id = TestId }), "Expected equality");
     Assert.IsFalse(product.Equals(TestId), "Expected inequality");
 }
Example #2
0
 public void HashCodeCanBeRetrievedWhenIdIsNull()
 {
     Product product = new Product();
     Assert.IsNotNull(product.GetHashCode(), "Expected a hash code");
 }