public Form1()
        {
            InitializeComponent();

            RecipeCreatorTest test = new RecipeCreatorTest();

            test.CheckFilesInfo();
            test.IngredientsFileContentsCheck();
            test.RecipesFileContentsCheck();

            FileOp fileOp = new FileOp();

            string[] filesInfoIngredients = fileOp.getIngredientsInfo();
            string[] filesInfoRecipes     = fileOp.getRecipesInfo();

            fileNameAndContentIngredientCollector = fileOp.getIngredientsFileContents(filesInfoIngredients);
            fileNameAndContentRecipeCollector     = fileOp.getRecipesFileContents(filesInfoRecipes);
            List <string> keyList = new List <string>(fileNameAndContentIngredientCollector.Keys);


            foreach (string key in keyList)
            {
                lstSoup.Items.Add(key);
            }
        }
Exemple #2
0
        public void IngredientsFileContentsCheck()
        {
            FileOp fileOp1 = new FileOp();

            string[] result1 = fileOp1.getIngredientsInfo();
            Dictionary <string, List <string> > contents1 = fileOp1.getIngredientsFileContents(result1);

            FileOp fileOp2 = new FileOp();

            string[] result2 = fileOp2.getIngredientsInfo();
            Dictionary <string, List <string> > contents2 = fileOp2.getIngredientsFileContents(result2);

            Assert.AreEqual(result1, result2);
        }