public void testCleanup() { task1 = null; task2 = null; task3 = null; todoList = null; }
public void testInitialize() { task1 = new ToDoListNS.Task("task1", false); task2 = new ToDoListNS.Task("task2", false); task3 = new ToDoListNS.Task("task3", false); todoList = new ToDoListNS.ToDoList(); }
public void TestAddtask() { Task task1 = new Task("task1", false); ToDoListNS.ToDoList todoList = new ToDoListNS.ToDoList(); Assert.IsNotNull(todoList); todoList.addTask(task1); Assert.AreEqual(1, todoList.getAllTasks().Count); Assert.AreEqual(task1, todoList.getTask(task1.Description)); }
public void TestCompleteTask() { Task task1 = new Task("task1", false); ToDoListNS.ToDoList todoList = new ToDoListNS.ToDoList(); Assert.IsNotNull(todoList); todoList.addTask(task1); Assert.AreEqual(1, todoList.getAllTasks().Count); Assert.IsFalse(todoList.getStatus(task1.Description)); todoList.completeTask(task1.Description); Assert.IsTrue(todoList.getStatus(task1.Description)); }