コード例 #1
0
 public void ShouldOnlyBeAbleToOrderOneItemOfEachTypeThatIsDifferentOfSides()
 {
     var nightOrder = new MockedNightOrder(new MockedMealMenu());
     Assert.IsTrue(nightOrder.ValidateOrder(MealType.Dessert));
     nightOrder.AddOrders(new List<Order> { new Order(MealType.Dessert, "Dessert"), new Order(MealType.Dessert, "Dessert") });
     Assert.IsFalse(nightOrder.ValidateOrder(MealType.Dessert));
 }
コード例 #2
0
 public void ShouldBeAbleToOrderManySides()
 {
     var nightOrder = new MockedNightOrder(new MockedMealMenu());
     Assert.IsTrue(nightOrder.ValidateOrder(MealType.Side));
     nightOrder.AddOrders(new List<Order> { new Order(MealType.Side, "Side"), new Order(MealType.Side, "Side") });
     Assert.IsTrue(nightOrder.ValidateOrder(MealType.Side));
 }
コード例 #3
0
 public void ShouldReturnFalseOnValidationIfInvalidMealType()
 {
     var nightOrder = new MockedNightOrder(new MockedMealMenu());
     Assert.IsFalse(nightOrder.ValidateOrder((MealType)222));
 }