Example #1
0
        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));
        }
Example #2
0
        public void CalculateLoafCost_CalculatesTotalCostOfLoaves_Int()
        {
            int   numOfLoaves     = 2;
            Bread firstBreadOrder = new Bread(numOfLoaves);

            Assert.AreEqual(10, firstBreadOrder.CalculateLoafCost(2));
        }