public void updateProcessTimeFailedTest() { string name = "name"; TimeSpan time = new TimeSpan(0, 20, 0); PTDate date = new PTDate(1, DateTime.Today); bool expected = false; bool actual = PTDatabase.UpdateProcessTime(name, date, time); Assert.AreEqual(expected, actual); }
public void updateProcessTimeSuccessfulTest() { string name = "name"; TimeSpan time = new TimeSpan(0, 20, 0); PTProcessInfo info; info.index = 1; info.name = name; info.activeTime = time; PTDate date; date.index = 1; date.date = DateTime.Now.Date; bool expected = true; bool inserted = PTDatabase.InsertProcessInfo(info, date); bool actual = PTDatabase.UpdateProcessTime(name, date, time); Assert.AreEqual(expected, actual); }