Пример #1
0
 public void testCleanup()
 {
     task1    = null;
     task2    = null;
     task3    = null;
     todoList = null;
 }
Пример #2
0
 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();
 }
Пример #3
0
        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));
        }
Пример #4
0
        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));
        }