コード例 #1
0
ファイル: FoodPlanTests.cs プロジェクト: gmer56/GCM-Practicum
        public void MorningPlanShouldNotAllowDessert()
        {
            var temp = new FoodPlan(FoodPlanType.Morning);

            temp.AddItem(DishType.Dessert);
            var isValid = temp.Validate(DishType.Dessert);

            Assert.AreEqual(false, isValid);
        }
コード例 #2
0
ファイル: FoodPlanTests.cs プロジェクト: gmer56/GCM-Practicum
        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);
        }
コード例 #3
0
ファイル: FoodPlanTests.cs プロジェクト: gmer56/GCM-Practicum
        public void MorningPlanShouldNotAllowMoreThanOneEntree()
        {
            var temp = new FoodPlan(FoodPlanType.Morning);

            temp.AddItem(DishType.Entree);
            temp.AddItem(DishType.Entree);
            var isValid = temp.Validate(DishType.Entree);

            Assert.AreEqual(false, isValid);
        }
コード例 #4
0
ファイル: FoodPlanTests.cs プロジェクト: gmer56/GCM-Practicum
        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);
        }
コード例 #5
0
ファイル: FoodPlanTests.cs プロジェクト: gmer56/GCM-Practicum
        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);
        }