Exemple #1
0
        public void RecipeMLLoadTest()
        {
            string recipeML = TestResources.RecipeML1;
            IRecipeConverter recipeConverter = new RecipeMLConverter();
            recipeConverter.Load(recipeML);
            Recipe r = recipeConverter.ToRecipe();

            Assert.IsTrue(r.IngredientsRequired.Any(p => p.Ingredient.Name.Contains("butter")));
            Assert.IsTrue(r.IngredientsRequired.Any(p => p.Ingredient.Name.Contains("flower")));
            Assert.IsTrue(r.IngredientsRequired.Any(p => p.Ingredient.Name.Contains("salt")));
        }
        public void RecipeMLLoad()
        {
            string ml = TestResources.RecipeML1;

            IRecipeConverter rml = new RecipeMLConverter();
            rml.Load(ml);

            Recipe r = rml.ToRecipe();

            Assert.IsNotNull(r);

            string blah = r.IngredientsRequired.ToString();
        }