Beispiel #1
0
        public void CervezaGrande()
        {
            BeverageComponent b = new Beer();

            b = new GrandSizeDecorator(b);

            Assert.True(b.getCost() == 4.25);
            Assert.True(b.getDescription() == "Cerveza, tamaño grande");
        }
Beispiel #2
0
        public void CervezaGrandeConCanela()
        {
            BeverageComponent b = new Beer();

            b = new GrandSizeDecorator(b);
            b = new CanelaDecorator(b);

            Assert.True(b.getCost() == 4.4);
            Assert.True(b.getDescription() == "Cerveza, tamaño grande, con canela");
        }
Beispiel #3
0
        public void CafeConHieloGrande()
        {
            BeverageComponent b = new Coffee();

            b = new IceDecorator(b);
            b = new GrandSizeDecorator(b);

            Assert.True(b.getCost() == 3.75);
            Assert.True(b.getDescription() == "Café, con hielo, tamaño grande");
        }