public void ShouldAddAProductToCart() { Product bread = new Product("Bread", 10.12m); Product[] products = { new Product("Milk", 12.10m) }; ShoppingCart cart = new ShoppingCart(products); cart.AddProductToCart(bread); Assert.AreEqual(2, cart.GetLength()); }
public void ShouldReturnThePriceOfTheProduct() { Product prod = new Product("Milk", 12.10m); decimal expected = prod.GetPrice(); Assert.AreEqual(12.10m, expected); }
public void ShouldReturnTheNameOfTheProduct() { Product prod = new Product("Milk", 12.10m); string expected = prod.GetName(); Assert.AreEqual("Milk", expected); }