public void CheckFilesInfo() { FileOp fileOp1 = new FileOp(); string[] result1 = fileOp1.getIngredientsInfo(); FileOp fileOp2 = new FileOp(); string[] result2 = fileOp2.getIngredientsInfo(); Assert.AreEqual(result1, result2); FileOp fileOp3 = new FileOp(); string[] result3 = fileOp3.getRecipesInfo(); FileOp fileOp4 = new FileOp(); string[] result4 = fileOp4.getRecipesInfo(); Assert.AreEqual(result3, result4); FileOp fileOp5 = new FileOp(); string[] result5 = fileOp3.getRecipesInfo(); FileOp fileOp6 = new FileOp(); string[] result6 = fileOp6.getRecipesInfo(); Assert.AreEqual(result5, result6); }
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); } }
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); }