public void SetUpRecipeTest() { bool check = true; string getPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\..\..\")); string path = getPath + "GoDiet\\DietData"; DateTime example = new DateTime(2019, 3, 28); MyMethodsLib.SetUpRecipe(path, "b.json", 1, example, "anyname"); Assert.AreEqual(check, MyMethodsLib.checkForTesting); }
public void SetUpRecipeWrongJsonNameTest() { string getPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\..\..\")); string path = getPath + "\\GoDiet\\DietData"; DateTime example = new DateTime(2019, 3, 28); try { MyMethodsLib.SetUpRecipe(path, "baba.json", 1, example, "anyname"); Assert.Fail(); } catch (Exception) { } }