public void BreadTotal_CalculateBreadTotalOfFiveWithDiscount_Int()
        {
            int   quantity = 5;
            Bread newBread = new Bread(quantity);

            Assert.AreEqual(20, newBread.BreadTotal(quantity));
        }
예제 #2
0
        public void CalcLoafs_CalculatesTotalOFBraodLoafs_Total()
        {
            Bread newOrder = new Bread(17);
            int   result   = Bread.BreadTotal(17);

            Assert.AreEqual(60, result);
        }
        public void BreadTotal_CalculateBreadTotalOfOneWithoutDiscount_Int()
        {
            int   quantity = 1;
            Bread newBread = new Bread(quantity);

            Assert.AreEqual(5, newBread.BreadTotal(quantity));
        }
예제 #4
0
        public void Bread_BreadDiscount_Int()
        {
            int   Quantity = 5;
            Bread newBread = new Bread(Quantity);

            Assert.AreEqual(20, newBread.BreadTotal(Quantity));
        }
예제 #5
0
        public void Bread_SingleBreadNoDiscount_Int()
        {
            int   quantity = 1;
            Bread newBread = new Bread(quantity);

            Assert.AreEqual(5, newBread.BreadTotal(quantity));
        }
예제 #6
0
        public void OrderConstructor_PassesBreadTotalsAsParameter_10()
        {
            Bread bread1 = new Bread(3);
            Order order1 = new Order(bread1.BreadTotal(), 1);

            Assert.AreEqual(10, order1.AllBread);
        }
예제 #7
0
        public static void Main()
        {
            Console.WriteLine("How many Pasteries");
            string amount       = Console.ReadLine();
            int    pastryAmount = int.Parse(amount);



            Console.WriteLine("How many loafs of bread");
            string bread       = Console.ReadLine();
            int    breadAmount = int.Parse(bread);

            Pastry pastryOrder = new Pastry(0, 2);
            Bread  breadOrder  = new Bread(0, 5);

            List <Bread> Bread = new List <Bread>()
            {
            };
            List <Pastry> Pastry = new List <Pastry>()
            {
            };



            Console.WriteLine("Your Total for bread is : $ " + breadOrder.BreadTotal(breadAmount) + " And your total for pasteries is: $ " + pastryOrder.PastryTotal(pastryAmount));
        }
        public void Order_CreatesInstanceOfOrderBreadTotal_Int()
        {
            int   quantity = 5;
            Bread newBread = new Bread(quantity);

            newBread.BreadTotal(newBread.Quantity);
            int   breadTotal = newBread.Total;
            Order newOrder   = new Order(breadTotal, 1);
            int   result     = newOrder.BreadTotal;

            Assert.AreEqual(breadTotal, result);
        }
        public void Order_CalcultesOrderTotal_Int()
        {
            int    quantity  = 5;
            Bread  newBread  = new Bread(quantity);
            Pastry newPastry = new Pastry(quantity);

            newBread.BreadTotal(newBread.Quantity);
            newPastry.PastryTotal(newPastry.Quantity);
            int   breadTotal  = newBread.Total;
            int   pastryTotal = newPastry.Total;
            Order newOrder    = new Order(breadTotal, pastryTotal);
            int   result      = newOrder.Total(newOrder.BreadTotal, newOrder.PastryTotal);

            Assert.AreEqual(29, result);
        }
예제 #10
0
        public void BreadTotal_CalculatesTotalBreadCostWithDeals_15()
        {
            Bread bread1 = new Bread(4);

            Assert.AreEqual(15, bread1.BreadTotal());
        }
예제 #11
0
        public void BreadTotal_CalculatesTotalBreadCost_10()
        {
            Bread bread1 = new Bread(2);

            Assert.AreEqual(10, bread1.BreadTotal());
        }
예제 #12
0
        public void BreadTotal_ReturnCostOfBread_Int()
        {
            Bread newOrder = new Bread(5);

            Assert.AreEqual(20, newOrder.BreadTotal());
        }