Exemplo n.º 1
0
        public void Create_Hot_Spicy_Pizza_As_Base()
        {
            Component oven = new DecoratorOne(new DecoratorTwo(new ConcreteComponent()));

            Assert.IsInstanceOf <Component>(oven);
            Assert.IsInstanceOf <DecoratorBase>(oven);
            Assert.AreEqual("Hot Spicy Pizza", oven.Cook());
        }
Exemplo n.º 2
0
        public void Create_Hot_Spicy_Pizza()
        {
            var oven = new DecoratorOne(new DecoratorTwo(new ConcreteComponent()));

            Assert.AreEqual("Hot Spicy Pizza", oven.Cook());
        }