public void Thanksgiving_Constructor_ShouldHoldCorrectValues()
        {
            Thanksgiving dinner = new Thanksgiving("Turkey", "Stuffing", "Cranberry Sauce", "Mashed Potatoes", true);

            bool actual   = dinner.TurkeyIsDone;
            bool expected = true;

            string actualOne   = dinner.FoodOne;
            string expectedOne = "Turkey";

            string actualTwo   = dinner.FoodTwo;
            string expectedTwo = "Stuffing";

            string actualThree   = dinner.FoodThree;
            string expectedThree = "Cranberry Sauce";

            string actualFour   = dinner.FoodFour;
            string expectedFour = "Mashed Potatoes";

            Assert.AreEqual(actual, expected);
            Assert.AreEqual(actualOne, expectedOne);
            Assert.AreEqual(actualTwo, expectedTwo);
            Assert.AreEqual(actualThree, expectedThree);
            Assert.AreEqual(actualFour, expectedFour);
        }
Пример #2
0
        public void MakeThanksgivingItem()
        {
            Thanksgiving turkey = new Thanksgiving();

            turkey.Name        = "Turkey";
            turkey.Ingredients = new List <string>(new string[] { "turkey", "apples", "cinnamon", "oil", "sage", "rosemary" });
            turkey.FoodType    = FoodType.Entre;
            turkey.Cost        = 35m;
            turkey.IsFavorite  = true;

            Thanksgiving mashedPotatos = new Thanksgiving();

            mashedPotatos.Name        = "Mashed Potatos";
            mashedPotatos.Ingredients = new List <string>(new string[] { "potatos", "butter", "salt", "pepper" });
            mashedPotatos.FoodType    = FoodType.Side;
            mashedPotatos.Cost        = 5m;
            mashedPotatos.IsFavorite  = true;

            Thanksgiving cranberrySauce = new Thanksgiving();

            cranberrySauce.Name        = "Cranberry Sauce";
            cranberrySauce.Ingredients = new List <string>(new string[] { "cranberries", "sugar" });
            cranberrySauce.FoodType    = FoodType.Sauce;
            cranberrySauce.Cost        = 3m;
            cranberrySauce.IsFavorite  = true;

            Thanksgiving salad = new Thanksgiving();

            salad.Name        = "Salad";
            salad.Ingredients = new List <string>(new string[] { "lettuce", "apples", "spinach", "cheese", "vinagrette", "cucumbers" });
            salad.FoodType    = FoodType.Side;
            salad.Cost        = 7m;
            salad.IsFavorite  = false;
        }
Пример #3
0
        public void TestMethod1()
        {
            Thanksgiving dinner = new Thanksgiving();

            dinner.GuestCount = 45;
            dinner.Name       = "Dinner";
            dinner.Type       = FoodType.Entree;

            Thanksgiving dinnerTwo = new Thanksgiving("Dinner At Your Place", true, "Indiana", 50, 0.15d, FoodType.Appetizer);


            Thanksgiving dinnerThree = new Thanksgiving("another name");
        }
Пример #4
0
        public void ThanksgivingTest_SetTurkey_ShouldBeCorrect()
        {
            //--Arrange
            Thanksgiving dinner = new Thanksgiving("turkey", true, 4, true);

            //--Act
            string actualTurkey         = dinner.MainCourse;
            bool   actualMashedPotatoes = dinner.MashedPotatoes;
            int    actualSideDishes     = dinner.NumberOfSideDishes;
            bool   actualPilgrimHats    = dinner.PilgrimHats;

            string expectedTurkey         = "turkey";
            bool   expectedMashedPotatoes = true;
            int    expectedSideDishes     = 4;
            bool   expectedPilgrimHats    = true;

            //--Assert
            Assert.AreEqual(actualTurkey, expectedTurkey);
            Assert.AreEqual(actualMashedPotatoes, expectedMashedPotatoes);
            Assert.AreEqual(actualSideDishes, expectedSideDishes);
            Assert.AreEqual(actualPilgrimHats, expectedPilgrimHats);
        }
Пример #5
0
        public void MakeThanksgivingItemWithConstructors()
        {
            Thanksgiving turkey = new Thanksgiving("Turkey", true, FoodType.Entre, 35)
            {
                Ingredients = { "turkey", "apples", "cinnamon", "oil", "sage", "rosemary" }
            };

            Thanksgiving mashedPotatos = new Thanksgiving("Mashed Potatos", true, FoodType.Side, 5m)
            {
                Ingredients = { "potatos", "butter", "salt", "pepper" }
            };

            Thanksgiving cranberrySauce = new Thanksgiving("Cranberry Sauce", true, FoodType.Sauce, 3m)
            {
                Ingredients = { "cranberries", "sugar" }
            };

            Thanksgiving salad = new Thanksgiving("Salad", false, FoodType.Side, 7m)
            {
                Ingredients = { "lettuce", "apples", "spinach", "cheese", "vinagrette", "cucumbers" }
            };
        }