public void NightPlanShouldNotAllowMoreThanOneDessert() { var temp = new FoodPlan(FoodPlanType.Night); temp.AddItem(DishType.Dessert); temp.AddItem(DishType.Dessert); var isValid = temp.Validate(DishType.Dessert); Assert.AreEqual(false, isValid); }
public void GetPlansReturnMultipleSides() { var temp = new FoodPlan(FoodPlanType.Night); temp.AddItem(DishType.Side); temp.AddItem(DishType.Side); var result = temp.GetPlan(); StringAssert.Contains(result, "x2"); }
public void MorningPlanShouldNotAllowMoreThanOneSide() { var temp = new FoodPlan(FoodPlanType.Morning); temp.AddItem(DishType.Side); temp.AddItem(DishType.Side); var isValid = temp.Validate(DishType.Side); Assert.AreEqual(false, isValid); }
public void GetPlansReturnMultipleDrinks() { var temp = new FoodPlan(FoodPlanType.Morning); temp.AddItem(DishType.Drink); temp.AddItem(DishType.Drink); temp.AddItem(DishType.Drink); var result = temp.GetPlan(); StringAssert.Contains(result, "x3"); }
public void NightPlanShouldAllowMoreThanOneSide() { var temp = new FoodPlan(FoodPlanType.Night); temp.AddItem(DishType.Side); temp.AddItem(DishType.Side); var isValid = temp.Validate(DishType.Side); Assert.AreEqual(2, temp.SideCount); Assert.AreEqual(true, isValid); }
public void MorningPlanShouldAllowMoreThanOneDrink() { var temp = new FoodPlan(FoodPlanType.Morning); temp.AddItem(DishType.Drink); temp.AddItem(DishType.Drink); var isValid = temp.Validate(DishType.Drink); Assert.AreEqual(2, temp.DrinkCount); Assert.AreEqual(true, isValid); }
protected FoodPlan SetupValidBaseFoodPlan() { var fp = new FoodPlan(FoodPlanType.Morning); fp.AddItem(DishType.Entree); return(fp); }
public void AddDishShouldAddDessertToProperBucket() { var temp = new FoodPlan(FoodPlanType.Morning); temp.AddItem(DishType.Dessert); Assert.AreEqual(1, temp.DessertCount); }
public void RemoveDishShouldRemoveSideFromProperBucket() { var temp = new FoodPlan(FoodPlanType.Morning); temp.AddItem(DishType.Side); Assert.AreEqual(1, temp.SideCount); temp.RemoveItem(DishType.Side); Assert.AreEqual(0, temp.SideCount); }
public void AddInvalidDishShouldThrowException() { var temp = new FoodPlan(FoodPlanType.Morning); temp.AddItem((DishType)7); }