public void AddItemTest() { string prodname = "Banana"; decimal latestPrice = 0.75m; int quantity = 2; OrderItem target = new OrderItem(prodname, latestPrice, quantity); int expected = 3; int actual = target.AddItem(); Assert.AreEqual(expected, actual); }
public void AddItemQuantityAddedBlank() { // Arrange string pName = "Beans"; decimal lPrice = 1.00M; int quant = 4; OrderItem beans = new OrderItem(pName, lPrice, quant); // Act beans.AddItem(); // Assert Assert.AreEqual(5, beans.Quantity); }