internal static CreateIngredientCommand ValidCreateIngredientCommand(string name)
        {
            var share = new MacroNutrientShare(MacroNutrient.Carbohydrate, 0.2);
            var macroNutrientsParticipation = new MacroNutrientsSharesCollection(new List <MacroNutrientShare> {
                share
            });

            return(new CreateIngredientCommand(Guid.NewGuid(), name, Allergens.ToString(), Requirements.ToString(), macroNutrientsParticipation));
        }
        public void GivenValidShare_DuringShareCreating_ShouldCreateMacroNutrientShare()
        {
            var systemUnderTest = new MacroNutrientShare(MacroNutrient.Carbohydrate, 0.2);

            using (new AssertionScope())
            {
                systemUnderTest.Share.Should().Be(0.2);
                systemUnderTest.MacroNutrient.Should().Be(MacroNutrient.Carbohydrate);
            }
        }
 public static MacroNutrientShares FromDomainIngredient(Guid id, MacroNutrientShare macroNutrientShare)
 => new MacroNutrientShares(id, macroNutrientShare.MacroNutrient.ToString(), macroNutrientShare.Share);