Ejemplo n.º 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");
 }
Ejemplo n.º 2
0
        public void TestProperties()
        {
            Product product = new Product() { Id = TestId, Name = TestName };

            Assert.AreEqual(TestId, product.Id, "Expected the property to persist");
            Assert.AreEqual(TestName, product.Name, "Expected the property to persist");
        }
Ejemplo n.º 3
0
 public void TestShowGoesAheadWhenItCan()
 {
     Product product = new Product() { Id = TestId };
     product.Show();
     Assert.Pass();
 }
Ejemplo n.º 4
0
 public void TestIdPropertyIsRequiredForShow()
 {
     Product product = new Product();
     product.Show();
 }