Esempio n. 1
0
        public void TestImmutabilityWithInvalidArgument()
        {
            var product = new ProductPile("Milk", 3, 13);

            Assert.AreEqual(3, product.Amount);

            var newProduct = product.SubtractOne();

            Assert.AreEqual(3, product.Amount);
            Assert.AreEqual(2, newProduct.Amount);
        }
Esempio n. 2
0
 public void TestImmutability()
 {
     var product = new ProductPile(null, 3, 13);
 }