internal static Ingredient CreateIngredientWithOneShare(string name, MacroNutrient macroNutrient, IIngredientRepository ingredientRepository)
        {
            var ingredientFactory = new Ingredient.IngredientFactory(ingredientRepository, EventPublisherMock.Object);
            var shares            = new HashSet <MacroNutrientShare> {
                new MacroNutrientShare(macroNutrient, 0.2)
            };
            var macroNutrientsShares = new MacroNutrientsSharesCollection(shares);

            return(ingredientFactory.Create(Guid.NewGuid(),
                                            name,
                                            Allergens,
                                            Requirements,
                                            macroNutrientsShares));
        }
        internal static Ingredient CreateValidIngredientWithEventPublisher(string name, IIngredientRepository ingredientRepository, IEventPublisher eventPublisher)
        {
            var ingredientFactory = new Ingredient.IngredientFactory(ingredientRepository, eventPublisher);
            var shares            = new HashSet <MacroNutrientShare>
            {
                new MacroNutrientShare(MacroNutrient.Carbohydrate, 0.2),
                new MacroNutrientShare(MacroNutrient.Fat, 0.2),
                new MacroNutrientShare(MacroNutrient.Protein, 0.3)
            };
            var macroNutrientsShares = new MacroNutrientsSharesCollection(shares);

            return(ingredientFactory.Create(Guid.NewGuid(),
                                            name,
                                            Allergens,
                                            Requirements,
                                            macroNutrientsShares));
        }
        internal static Ingredient CreateValidIngredient(Guid id,
                                                         string name,
                                                         double carbohydrates,
                                                         double fat,
                                                         double protein,
                                                         IIngredientRepository ingredientRepository)
        {
            var ingredientFactory = new Ingredient.IngredientFactory(ingredientRepository, EventPublisherMock.Object);
            var shares            = new HashSet <MacroNutrientShare>
            {
                new MacroNutrientShare(MacroNutrient.Carbohydrate, carbohydrates),
                new MacroNutrientShare(MacroNutrient.Fat, fat),
                new MacroNutrientShare(MacroNutrient.Protein, protein)
            };
            var macroNutrientsShares = new MacroNutrientsSharesCollection(shares);

            return(ingredientFactory.Create(id, name, Allergens, Requirements, macroNutrientsShares));
        }