예제 #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());
        }
예제 #2
0
        public void Create_Hot_Spicy_Pizza()
        {
            var oven = new DecoratorOne(new DecoratorTwo(new ConcreteComponent()));

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