Exemple #1
0
        public void GivenNewFood_WhenCreatedWithoutWeight_ThenComponentsIsNotNull()
        {
            var food = new DietFood("Name");

            Assert.NotNull(food.Components);
            Assert.Equal("Name", food.Name);
        }
Exemple #2
0
        public void GivenNewFood_WhenCreatedWithWeight_ThenNameAndWeightAreSet()
        {
            var food = new DietFood("Name", 24);

            Assert.Equal("Name", food.Name);
            Assert.Equal(24, food.WeigthInGr);
        }
Exemple #3
0
        public void GivenNewDietScheduledMeal_WhenNewFoodAdded_ThenFoodIsTracked()
        {
            var dietMeal = new DietScheduledMeal();
            var food     = new DietFood("Name", 24);

            dietMeal.FoodList.Add(food);
            var foodAdded = dietMeal.FoodList[0];

            Assert.Equal(food.Name, foodAdded.Name);
            Assert.Equal(food.WeigthInGr, foodAdded.WeigthInGr);
        }
Exemple #4
0
        public void GivenNewFood_WhenCreatedWithWeight_ThenComponentsIsNull()
        {
            var food = new DietFood("Name", 24);

            Assert.Null(food.Components);
        }