public void CalcOrderCostOneItem_ReturnsTotalCost_Cost() { // Arrange string flavor = "Plain"; int orderNumber = 1; int price = 5; int orderTotal = 5; Bread newBread = new Bread(flavor, price); // Act double result = newBread.CalculateOrderCost(orderNumber); // Assert Assert.AreEqual(orderTotal, result); }
public void CalcOrderCostFiveItems_ReturnsTotalWithDiscount_Total() { // Arrange string flavor = "Plain"; int orderQuantity = 5; int price = 5; int orderTotal = 20; Bread newBread = new Bread(flavor, price); // Act double result = newBread.CalculateOrderCost(orderQuantity); // Assert Assert.AreEqual(orderTotal, result); }
public void CalculateOrderCost_GetCostOfOrder_Int() { int numOfLoaves = 2; Bread fourthBreadOrder = new Bread(numOfLoaves); int totalCostForLoaves = fourthBreadOrder.CalculateLoafCost(numOfLoaves); int totalCostForPastries = 5; int totalOrderCost = totalCostForLoaves + totalCostForPastries; Assert.AreEqual(totalCostForLoaves, fourthBreadOrder.CalculateLoafCost(numOfLoaves)); Assert.AreEqual(totalOrderCost, fourthBreadOrder.CalculateOrderCost(totalCostForLoaves, totalCostForPastries)); }