@@ -0,0 +1,3620 @@
+package guitests;%0A%0Aimport static org.junit.Assert.assertTrue;%0Aimport static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;%0A%0Aimport org.junit.Test;%0A%0Aimport guitests.guihandles.TaskCardHandle;%0Aimport seedu.address.commons.core.Messages;%0Aimport seedu.address.commons.exceptions.IllegalDateTimeValueException;%0Aimport seedu.address.commons.exceptions.IllegalValueException;%0Aimport seedu.address.logic.commands.ConfirmCommand;%0Aimport seedu.address.logic.commands.exceptions.CommandException;%0A%0Apublic class ConfirmCommandTest extends TaskManagerGuiTest %7B%0A%0A    public static final String COMMAND_WORD = %22confirm%22;%0A    public static final String MESSAGE_USAGE = COMMAND_WORD + %22: Confirms the bookings of the task identified %22%0A            + %22by the index number used in the last task listing. %22%0A            + %22Other booking slots will be removed.%5Cn%22%0A            + %22Parameters: INDEX (index of the task in the current task list and must be a positive integer)%5Cn%22%0A            + %22Parameters: INDEX (index of the time slot to confirm and must be a positive integer)%5Cn%22%0A            + %22Example: %22 + COMMAND_WORD + %22 1 1%22;%0A    public static final String MESSAGE_NO_SUCH_BOOKING = %22Index provided is invalid.%5Cn%22 + MESSAGE_USAGE;%0A    public static final String MESSAGE_TASK_NO_BOOKING = %22This task does not have bookings to confirm.%22;%0A    public static final String MESSAGE_DUPLICATE_TASK = %22This task already exists in the task manager.%22;%0A%0A    @Test%0A    public void confirm_isMutating_ReturnTrue() throws IllegalDateTimeValueException, IllegalValueException, CommandException %7B%0A        ConfirmCommand cc = new ConfirmCommand(1, 1);%0A        assertTrue(cc.isMutating());%0A    %7D%0A%0A    @Test%0A    public void confirm_invalidCommand() throws IllegalDateTimeValueException, IllegalValueException, CommandException %7B%0A        commandBox.runCommand(%22confirm -1 -2%22);%0A        assertResultMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));%0A%0A        commandBox.runCommand(%22confirm a b%22);%0A        assertResultMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));%0A    %7D%0A%0A    @Test%0A    public void confirm_validOutOfRangeIndex() throws IllegalDateTimeValueException, IllegalValueException, CommandException %7B%0A        commandBox.runCommand(%22confirm 18 2%22);%0A        assertResultMessage(Messages.MESSAGE_INVALID_TASKS_DISPLAYED_INDEX);%0A%0A        commandBox.runCommand(%22confirm 12 2%22);%0A        assertResultMessage(Messages.MESSAGE_INVALID_TASKS_DISPLAYED_INDEX);%0A    %7D%0A%0A    @Test%0A    public void confirm_ValidConfirmCommand_ReturnTrue() %7B%0A        commandBox.runCommand(%22book Complete booking #friends on 19 May 2017 2pm to 5pm, 12 May 2017 2pm to 5pm%22);%0A        TaskCardHandle addedCard = taskListPanel.navigateToTask(%22Complete booking%22);%0A        assertTrue(addedCard.getTitle().equals(%22Complete booking%22));%0A        System.out.println(taskListPanel.getNumberOfTasks());%0A%0A        commandBox.runCommand(%22confirm 8 2%22);%0A        TaskCardHandle confirmedCard = taskListPanel.navigateToTask(%22Complete booking%22);%0A        System.out.println(confirmedCard.getStartTime());%0A        System.out.println(confirmedCard.getDeadline());%0A        assertTrue(!confirmedCard.getStartTime().equals(%22%22));%0A        assertTrue(!confirmedCard.getDeadline().equals(%22%22));%0A%0A        commandBox.runCommand(%22undo%22);%0A        confirmedCard = taskListPanel.navigateToTask(%22Complete booking%22);%0A        System.out.println(confirmedCard.getStartTime());%0A        System.out.println(confirmedCard.getDeadline());%0A        assertTrue(confirmedCard.getStartTime().equals(%22%22));%0A        assertTrue(confirmedCard.getDeadline().equals(%22%22));%0A    %7D%0A%7D%0A

Add confirm command test cases