コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: powareverb/TheKitchen
        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")));
        }
コード例 #2
0
        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();
        }