Esempio n. 1
0
        public void RemoveIngredientSelection()
        {
            UnitTestItems.ClearSelectedIngredients();

            NachoItem nacho = UnitTestItems.NachoItems.TwoIngredientNachoInBowl;

            _ = nacho.AddIngredient(UnitTestItems.Ingredients.Chicken);
            ProcessResult result = nacho.RemoveIngredient(UnitTestItems.Ingredients.Chicken);

            Assert.IsTrue(result.Success);

            UnitTestItems.ClearSelectedIngredients();
        }
Esempio n. 2
0
        public void RemoveWrongIngredientSelection()
        {
            UnitTestItems.ClearSelectedIngredients();

            NachoItem nacho = UnitTestItems.NachoItems.TwoIngredientNachoInBowl;

            _ = nacho.AddIngredient(UnitTestItems.Ingredients.Chicken);
            ProcessResult result = nacho.RemoveIngredient(UnitTestItems.Ingredients.Steak); //doesn't exist!

            Assert.IsFalse(result.Success);
            Assert.AreEqual("This ingredient was not added to this menu item.", result.Message);

            UnitTestItems.ClearSelectedIngredients();
        }