public void GivenNewFood_WhenCreatedWithoutWeight_ThenComponentsIsNotNull() { var food = new DietFood("Name"); Assert.NotNull(food.Components); Assert.Equal("Name", food.Name); }
public void GivenNewFood_WhenCreatedWithWeight_ThenNameAndWeightAreSet() { var food = new DietFood("Name", 24); Assert.Equal("Name", food.Name); Assert.Equal(24, food.WeigthInGr); }
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); }
public void GivenNewFood_WhenCreatedWithWeight_ThenComponentsIsNull() { var food = new DietFood("Name", 24); Assert.Null(food.Components); }