public void determineAddCommandTest2_TD() { UI testui = new UI(); OperationHandler target = new OperationHandler(); string input = "add "+Utility.TEST_NORMAL_ADDTASK_1; OperationHandler.determineCommand(input); string expected = Utility.TEST_NORMAL_ADDTASK_1; string actual = Storage.getTaskList()[Storage.getTaskList().Count - 1].setTaskDescription + Utility.SPACE_CHAR; Assert.AreEqual(expected, actual); }
public void determineAddCommandTest_ST_SD() { UI testui = new UI(); OperationHandler target = new OperationHandler(); string input = Utility.TEST_NORMAL_ADDTASK_3; OperationHandler.determineCommand(input); string expected ="08/10/2012 08:00:00 "; string actual = Storage.getTaskList()[Storage.getTaskList().Count - 1].setStart + " "; Assert.AreEqual(expected, actual); }
public void determineCompleteCommandTest() { UI testui = new UI(); OperationHandler target = new OperationHandler(); string input = Utility.TEST_NORMAL_ADDTASK_1; OperationHandler.determineCommand(input); OperationHandler.determineCommand("complete 1"); bool expected = true; bool actual = Storage.getTaskList()[Storage.getTaskList().Count - 1].setIsCompleted ; Assert.AreEqual(expected, actual); }
public void determineSearchCommandTest2() { UI testui = new UI(); OperationHandler target = new OperationHandler(); string input1 = Utility.TEST_NORMAL_ADDTASK_1; string input2 = Utility.TEST_NORMAL_ADDTASK_2; string input3 = Utility.TEST_NORMAL_ADDTASK_3; string input4 = Utility.TEST_NORMAL_ADDTASK_4; string input5 = Utility.TEST_NORMAL_ADDTASK_5; OperationHandler.determineCommand(input1); OperationHandler.determineCommand(input2); OperationHandler.determineCommand(input3); OperationHandler.determineCommand(input4); OperationHandler.determineCommand(input5); List<Task> searchedlist = OperationHandler.determineCommand("search 12/12"); int expected = 1; int actual = searchedlist.Count; Assert.AreEqual(expected, actual); }