Esempio n. 1
0
        public void FindCoffeeFromShopsSelectionFor_WithNull_ReturnNullCoffee()
        {
            cafeShop.InitializeCoffeeSelection(new List <Coffee>()
            {
                new Latte("latte", "small", 3), new Mocha("mocha", "large", 4)
            });
            var result = cafeShop.FindCoffeeFromShopsSelectionFor(null);

            Assert.That(result, Is.InstanceOf(typeof(NullCoffee)));
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            IPriceProcessor   myJsonPriceProcessor   = new JsonPriceProcessor(new BeverageFactory(), new JsonPriceLoader());
            IOrderProcessor   myJsonOrderProcessor   = new JsonOrderProcessor(new JsonOrderLoader());
            IPaymentProcessor myJsonPaymentProcessor = new JsonPaymentProcessor(new JsonPaymentLoader());
            IResultProvider   myJsonSerializer       = new ResultProvider();

            ICafeShop myCafeShop = new CafeShop(myJsonOrderProcessor, myJsonPaymentProcessor);

            List <Coffee> coffeeList = myJsonPriceProcessor.ProcessInputPrice();

            myCafeShop.InitializeCoffeeSelection(coffeeList);
            myCafeShop.LoadOrders();
            myCafeShop.UpdateCustomersBalance();

            myJsonSerializer.Create(myCafeShop.GetCustomerList());
        }