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()
                );
        }
示例#2
0
        public void SmallPizza()
        {
            var pizza = new SmallPizza();

            Assert.AreEqual(pizza.Description(), "Small Pizza");
            Assert.AreEqual(pizza.Cost(), 3.00);
        }