public void CalcPastryTotalCost_CalculateTotalCostOfPastryOrderWithLargeCount_IntSum() { int pastries = 50; int expectedPastryTotal = 84; Pastry pastry = new Pastry(); pastry.AdjustPastryCost(pastries); pastry.CalcPastryTotalCost(pastries); Assert.AreEqual(expectedPastryTotal, pastry.PastryOrderTotalCost); }
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); }