public void MyTestMethod()
 {
     IBeverage beverage = new Espresso();
     beverage = new Mocha(beverage); // add mocha
     beverage = new Mocha(beverage); // add mocha again
     beverage = new Soy(beverage); // add soy too
     Assert.AreEqual<string>("Espresso, Mocha, Mocha, Soy", beverage.Description);
 }
 public void EspressoCondimentsCost()
 {
     IBeverage beverage = new Espresso();
     beverage = new Mocha(beverage); // add mocha
     beverage = new Mocha(beverage); // add mocha again
     beverage = new Soy(beverage); // add soy too
     Assert.AreEqual<double>(2.79, beverage.Cost());
 }
Example #3
0
        static void Main(string[] args)
        {
            Beverage myEspresso = new Espresso();
            myEspresso = new Mocha(myEspresso);
            myEspresso = new Soy(myEspresso);
            myEspresso = new Whip(myEspresso);

            Console.WriteLine(myEspresso.getDescription() + " " + myEspresso.cost());

            Console.ReadLine();
        }
Example #4
0
        static void Main(string[] args)
        {
            Beverage espresso = new Espresso();
            Console.WriteLine(espresso.getDescription()+ " $" + espresso.cost());

            Beverage houseBlend = new HouseBlend();
            houseBlend = new Mocha(houseBlend);
            houseBlend= new Mocha(houseBlend);
            houseBlend = new Soy(houseBlend);
            Console.WriteLine(houseBlend.getDescription() + " $" + houseBlend.cost());

            Console.ReadLine();
        }
Example #5
0
        static void Main(string[] args)
        {
            Beverage beverage = new Espresso();

            Console.WriteLine(beverage.Description + " $" + beverage.Cost());

            Beverage beverage1 = new DarkRoast();

            beverage1 = new Mocha(beverage1);
            beverage1 = new Mocha(beverage1);
            beverage1 = new Whip(beverage1);
            Console.WriteLine(beverage1.Description + " $" + beverage1.Cost());

            Beverage beverage2 = new HouseBlend();

            beverage2 = new Soy(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);
            Console.WriteLine(beverage2.Description + " $" + beverage2.Cost());
        }
Example #6
0
        static void Main(string[] args)
        {
            IBeverage beverage = new Espresso();

            Console.WriteLine(beverage.description + " $" + beverage.cost());

            IBeverage beverage2 = new DarkRoast();

            beverage2 = new Mocha(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);
            Console.WriteLine(beverage2.description + " $" + beverage2.cost());

            IBeverage beverage3 = new HouseBlend();

            beverage3 = new Soy(beverage3);
            beverage3 = new Mocha(beverage3);
            beverage3 = new Whip(beverage3);
            Console.WriteLine(beverage3.description + " $" + beverage3.cost());
            Console.ReadLine();
        }
Example #7
0
        static void Main(string[] args)
        {
            Beverage beverage = new Espresso();

            Beverage beverage2 = new DarkRoast();

            beverage2 = new Mocha(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);

            Console.WriteLine(beverage2.getDescription() + " £" + beverage2.cost());

            Beverage beverage3 = new HouseBlend();

            beverage3 = new Soy(beverage3);
            beverage3 = new Mocha(beverage3);
            beverage3 = new Whip(beverage3);

            Console.WriteLine(beverage3.getDescription() + " £" + beverage3.cost());

            Console.ReadKey();
        }
Example #8
0
        static void Main(string[] args)
        {
            Console.WriteLine("Starbuzz Coffee");

            Beverage beverage = new Espresso();

            Console.WriteLine($"{beverage.Description} : ${beverage.Cost()}");

            Beverage beverage1 = new DarkRoast();

            beverage1 = new Mocha(beverage1);
            beverage1 = new Mocha(beverage1);
            beverage1 = new Whip(beverage1);
            Console.WriteLine($"{beverage1.Description} : ${beverage1.Cost()}");

            Beverage beverage2 = new HouseBlend();

            beverage2 = new Soy(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);
            Console.WriteLine($"{beverage2.Description} : ${beverage2.Cost()}");
        }
Example #9
0
        static void Main(string[] args)
        {
            Beverage beverage = new Espresso();

            Console.WriteLine($"{beverage.Description} $ {beverage.Cost()}");

            Beverage beverage2 = new DarkRoast();

            beverage2 = new Mocha(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);
            Console.WriteLine($"{beverage2.Description} $ {beverage2.Cost()}");


            Beverage beverage3 = new DarkRoast();

            beverage3 = new Soy(beverage3);
            beverage3 = new Mocha(beverage3);
            beverage3 = new Whip(beverage3);
            Console.WriteLine($"{beverage3.Description} $ {beverage3.Cost()}");

            Console.Read();
        }
        static void Main(string[] args)
        {
            Beverage beverage = new Espresso();

            beverage = new Venti(beverage);
            Console.WriteLine(beverage.GetDescription() + " $" + beverage.Cost());

            Beverage beverage5 = new Espresso();

            beverage5 = new Grande(beverage5);

            Console.WriteLine(beverage5.GetDescription() + " $" + beverage5.Cost());

            Beverage beverage2 = new DarkRoast();

            beverage2 = new Grande(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);
            Console.WriteLine(beverage2.GetDescription() + " $" + beverage2.Cost());

            Beverage beverage3 = new HouseBlend();

            beverage3 = new Venti(beverage3);
            beverage3 = new Mocha(beverage3);
            beverage3 = new Mocha(beverage3);
            beverage3 = new Whip(beverage3);
            Console.WriteLine(beverage3.GetDescription() + " $" + beverage3.Cost());

            Beverage beverage4 = new Decaf();

            beverage4 = new Tall(beverage4);
            beverage4 = new Milk(beverage4);
            beverage4 = new Soy(beverage4);
            beverage4 = new Whip(beverage4);
            Console.WriteLine(beverage4.GetDescription() + " $" + beverage3.Cost());
        }
Example #11
0
        static void Main(string[] args)
        {
            Console.OutputEncoding = Encoding.Default;

            Beverage beverage = new Espresso();

            Console.WriteLine(beverage.Description + " - Price: " + beverage.Cost() + " €");

            Beverage beverage2 = new DarkRoast();

            beverage2 = new Mocha(beverage2);
            beverage2 = new Mocha(beverage2);
            beverage2 = new Whip(beverage2);

            Console.WriteLine(beverage2.Description + " - Price: " + beverage2.Cost() + " €");

            Beverage beverage3 = new HouseBlend();

            beverage3 = new Soy(beverage3);
            beverage3 = new Mocha(beverage3);
            beverage3 = new Whip(beverage3);

            Console.WriteLine(beverage3.Description + " - Price: " + beverage3.Cost() + " €");
        }
Example #12
0
        static void Main(string[] args)
        {
            Beverage one = new DarkRoast();

            one.setSize("tall");
            one = new Mocha(one);
            one = new Mocha(one);
            Console.WriteLine(one.getDesciption().ToString() + ": ${0}", one.cost().ToString());

            Beverage two = new Espresso();

            two.setSize("grande");
            Console.WriteLine(two.getDesciption().ToString() + ": ${0}", two.cost().ToString());

            Beverage three = new HouseBlend();

            three.setSize("venti");
            three = new Soy(three);
            three = new Mocha(three);
            three = new Whip(three);
            Console.WriteLine(three.getDesciption() + ": ${0}", three.cost());

            Console.Read();
        }