示例#1
0
        public void HasBread_ShouldHaveBread()
        {
            var controller = new IToast.Controllers.PantryController();

            controller.PutBreads(0);
            controller.BuyToSupermarket(20);

            Assert.IsTrue(controller.HasBread(), "Pantry has bread");
        }
示例#2
0
        public void BuyToSupermarket()
        {
            var controller = new IToast.Controllers.PantryController();

            int breadsToBuy = 20;

            int howManyBreadsBeforeBuying = controller.HowManyBreads();

            controller.BuyToSupermarket(breadsToBuy);

            int howManyBreadsAfterBuying = controller.HowManyBreads();

            Assert.AreEqual(howManyBreadsAfterBuying - howManyBreadsBeforeBuying, breadsToBuy, "Buying " + breadsToBuy + " breads correctly");
        }