public void TestMethod1() { CafeRepository MyTest = new CafeRepository(); string check1 = MyTest.CreateDataBase("", "", "", "", ""); string check2 = MyTest.ReadFromDataBase(); string check3 = MyTest.DeleteDataBase(); Assert.IsNotNull(check1); Assert.AreEqual("read", check2); Assert.AreEqual("deleted", check3); }
public Menu() { Cafe.DeleteDataBase(); _mealname = "thismeal"; _mealdescription = "thisdescription"; _ingredients = "thisingredient"; _price = 1.00; for (int i = 0; i < _SIZE; i++) { Cafe._MenuItems[i] = string.Format("{0}: {1}\n{2}\n{3}\nprice: {4}\n", i + 1, _mealname, _mealdescription, _ingredients, _price++); _mealnumber = i + 1; Cafe.CreateDataBase(_mealnumber.ToString(), _mealname, _mealdescription, _ingredients, (_price).ToString()); } Cafe.ReadFromDataBase(); }