Esempio n. 1
0
        static void Main(string[] args)
        {
            IBeverage espresso = new FluentEspresso()
                                 .AddWater(20)
                                 .AddBeans()
                                 .ToBeverage();

            Console.WriteLine();

            IBeverage americano = new FluentEspresso()
                                  .AddWater(20)
                                  .AddWater(2)
                                  .AddBeans()
                                  .AddWater(2)
                                  .ToBeverage();

            Console.WriteLine();

            IBeverage latte = new FluentEspresso()
                              .AddWater(20)
                              .AddBeans()
                              .AddMilk()
                              .ToBeverage();

            Console.ReadKey();
        }
Esempio n. 2
0
 static void Main(string[] args)
 {
     try
     {
         FluentEspresso beverage = new FluentEspresso().AddWater(25, 85).AddBeans(new Bean(4, Bean.BeanTypes.Arabica)).GrindBeans().AddWater(15, true);
         Console.WriteLine(beverage.ToBeverage());
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            IBeverage espresso = new FluentEspresso()
                                 .FillWater()
                                 .AddBeans(new Bean()
            {
                AmountInG = 5, Sort = CoffeSort.Robusta
            })
                                 .PourEspresso()
                                 //.AddWater(5)
                                 .AddMilk()
                                 .AddChocolate()
                                 .MyIngredients()
                                 .ToBeverage();

            Console.WriteLine(espresso.GetType());

            Console.ReadKey();
        }