public void HasBread_ShouldHaveBread() { var controller = new IToast.Controllers.PantryController(); controller.PutBreads(0); controller.BuyToSupermarket(20); Assert.IsTrue(controller.HasBread(), "Pantry has bread"); }
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"); }