public void CalcBreadTotalCost_CalculateTotalCostOfBreadOrderWithLargeCount_IntSum() { int loaves = 50; int expectedBreadTotalCost = 170; Bread bread = new Bread(); bread.AdjustBreadCost(loaves); bread.CalcBreadTotalCost(loaves); bread.CalcBreadTotalCost(loaves); Assert.AreEqual(expectedBreadTotalCost, bread.BreadOrderTotalCost); }
public void CalcOrderTotalCost_CalculateCostOfBreadAndPastryOrdersWithZeroPastryCount_Int() { int loaves = 6; int pastries = 0; int expectedOrderTotalCost = 20; Order newOrder = new Order(); Bread bread = new Bread(); Pastry pastry = new Pastry(); bread.AdjustBreadCost(loaves); pastry.AdjustPastryCost(pastries); bread.CalcBreadTotalCost(loaves); pastry.CalcPastryTotalCost(pastries); newOrder.CalcOrderTotalCost(bread.BreadOrderTotalCost, pastry.PastryOrderTotalCost); Assert.AreEqual(expectedOrderTotalCost, newOrder.OrderTotalCost); }