public void CanGetDescriptionOfItem()
        {
            HalfCalzone halfCalzone = new HalfCalzone();

            halfCalzone.AddTopping(new Mushrooms());
            Assert.AreEqual(
                "half calzone with mushrooms",
                halfCalzone.Description()
                );

            FullCalzone fullCalzone = new FullCalzone();

            fullCalzone.AddTopping(new Mushrooms());
            fullCalzone.AddTopping(new BellPeppers());
            Assert.AreEqual(
                "full calzone with mushrooms and bell peppers",
                fullCalzone.Description()
                );

            SmallPizza smallPizza = new SmallPizza();

            smallPizza.AddTopping(new Mushrooms());
            smallPizza.AddTopping(new BellPeppers());
            smallPizza.AddTopping(new CherryTomatoes());
            Assert.AreEqual(
                "small pizza with mushrooms, bell peppers and cherry tomatoes",
                smallPizza.Description()
                );
        }
        public void CanGetTheCurrentPriceOfCalzone()
        {
            HalfCalzone halfCalzone = new HalfCalzone();

            halfCalzone.AddTopping(new Mushrooms());
            Assert.AreEqual(1188, halfCalzone.Price());

            FullCalzone fullCalzone = new FullCalzone();

            fullCalzone.AddTopping(new Mushrooms());
            Assert.AreEqual(1980, fullCalzone.Price());
        }
Ejemplo n.º 3
0
        public void CanGetTheCurrentPriceOfCalzone()
        {
            IMenuItem halfCalzone = new HalfCalzone();

            halfCalzone.AddTopping(new Mushrooms());
            Assert.AreEqual(1152, halfCalzone.Price());

            IMenuItem fullCalzone = new FullCalzone();

            fullCalzone.AddTopping(new Mushrooms());
            Assert.AreEqual(1920, fullCalzone.Price());
        }