public void Get_Total_Amount_Of_Orders()
        {
            MasterOrder newMaster = new MasterOrder();

            newMaster.AddOrder(new CookieOrder("Thin Mints", 10));
            newMaster.AddOrder(new CookieOrder("Thin Mints", 10));

            int totalBoxes = newMaster.GetTotalBoxes();

            Assert.Equal(2, totalBoxes);
        }
        public void Testtotalboxes()
        {
            MasterOrder order = new MasterOrder();

            //ACT
            order.AddOrder(new CookieOrder("mint", 5));
            order.AddOrder(new CookieOrder("Joescookies", 5));
            order.AddOrder(new CookieOrder("mint", 5));
            int total = order.GetTotalBoxes();

            //assert
            Assert.Equal(15, total);
        }
Exemplo n.º 3
0
        public void ShouldGetTotalBoxes() //
        {
            //ARRANGE
            MasterOrder testorder = new MasterOrder();

            //ACT
            testorder.AddOrder(new CookieOrder("fudge", 12));
            testorder.AddOrder(new CookieOrder("mix", 1));
            testorder.AddOrder(new CookieOrder("elephant", 2));
            int sum = testorder.GetTotalBoxes();

            //ASSERT
            Assert.Equal(15, sum);
        }
Exemplo n.º 4
0
        public void GetTotalBoxes_Defaults_To_Zero()
        {
            var result = masterOrder.GetTotalBoxes();

            Assert.Equal(0, result);
        }