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"); }
public void HashCodeCanBeRetrievedWhenIdIsNull() { Product product = new Product(); Assert.IsNotNull(product.GetHashCode(), "Expected a hash code"); }