public void ShouldOnlyBeAbleToOrderOneItemOfEachTypeThatIsDifferentOfDrinks() { var morningOrder = new MockedMorningOrder(new MockedMealMenu()); Assert.IsTrue(morningOrder.ValidateOrder(MealType.Side)); morningOrder.AddOrders(new List<Order> { new Order(MealType.Side, "Side"), new Order(MealType.Side, "Side") }); Assert.IsFalse(morningOrder.ValidateOrder(MealType.Side)); }
public void ShouldBeAbleToOrderManyDrinks() { var morningOrder = new MockedMorningOrder(new MockedMealMenu()); Assert.IsTrue(morningOrder.ValidateOrder(MealType.Drink)); morningOrder.AddOrders(new List<Order> { new Order(MealType.Drink, "Drink"), new Order(MealType.Side, "Drink") }); Assert.IsTrue(morningOrder.ValidateOrder(MealType.Drink)); }
public void ShouldReturnFalseOnValidationIfInvalidMealType() { var morningOrder = new MockedMorningOrder(new MockedMealMenu()); Assert.IsFalse(morningOrder.ValidateOrder((MealType)111)); }