public void OrderShouldReturnErrorIfValidationFails()
 {
     var abstractMealOrder = new MockedMealOrder(new MockedMealMenu(), false);
     abstractMealOrder.Order(MealType.Drink);
     Assert.AreEqual(1, abstractMealOrder.BaseOrderedItems.Count);
     Assert.AreEqual("error", abstractMealOrder.BaseOrderedItems.First().MealName);
 }
        private void assertOrderShouldReturnMealNameAndTypeIfValidationPass(MealType mealType, string expectedNameResult)
        {
            var abstractMealOrder = new MockedMealOrder(new MockedMealMenu(), true);
            abstractMealOrder.Order(mealType);

            Assert.AreEqual(1, abstractMealOrder.BaseOrderedItems.Count);

            var addedItem = abstractMealOrder.BaseOrderedItems.First();
            Assert.AreEqual(expectedNameResult, addedItem.MealName);
            Assert.AreEqual(mealType, addedItem.MealType);
        }
        public void OrderSummaryMustBeOrderedByMealType()
        {
            var abstractMealOrder = new MockedMealOrder(new MockedMealMenu());
            abstractMealOrder.AddOrders(new List<Order>
            {
                new Order(MealType.Drink, "Drink"),
                new Order(MealType.Entree, "Entree"),
                new Order(MealType.Side, "Side")
            });

            var summary = abstractMealOrder.GetOrderSummary();

            Assert.AreEqual("Entree,Side,Drink", summary);
        }
 public void OrderSummaryShouldReturnErrorIfNoOrders()
 {
     var abstractMealOrder = new MockedMealOrder(new MockedMealMenu());
     var summary = abstractMealOrder.GetOrderSummary();
     Assert.AreEqual("Invalid order. Orders must have atleast one dish.", summary);
 }