//@@author A0147996E
package guitests;

import org.junit.Test;

import seedu.address.logic.commands.AddCommand;
import seedu.address.logic.commands.DeleteCommand;
import seedu.address.logic.commands.EditCommand;
import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.commands.FinishCommand;
import seedu.address.logic.commands.ListCommand;
import seedu.address.logic.commands.ViewCommand;

public class HelpCommandTest extends TaskManagerGuiTest {
    @Test
    public void help() {
        //main commands help message display test
        assertHelpCommandSuccess("add");
        assertHelpCommandSuccess("delete");
        assertHelpCommandSuccess("edit");
        assertHelpCommandSuccess("find");
        assertHelpCommandSuccess("finish");
        assertHelpCommandSuccess("list");
        assertHelpCommandSuccess("view");
    }
    private void assertHelpCommandSuccess(String commandWord) {
        commandBox.runCommand("help " + commandWord);
        if (commandWord.equalsIgnoreCase("add")) {
            assertResultMessage(AddCommand.MESSAGE_USAGE);
        } else if (commandWord.equalsIgnoreCase("delete")) {
            assertResultMessage(DeleteCommand.MESSAGE_USAGE);
        } else if (commandWord.equalsIgnoreCase("edit")) {
            assertResultMessage(EditCommand.MESSAGE_USAGE);
        } else if (commandWord.equalsIgnoreCase("find")) {
            assertResultMessage(FindCommand.MESSAGE_USAGE);
        } else if (commandWord.equalsIgnoreCase("finish")) {
            assertResultMessage(FinishCommand.MESSAGE_USAGE);
        } else if (commandWord.equalsIgnoreCase("list")) {
            assertResultMessage(ListCommand.MESSAGE_USAGE);
        } else if (commandWord.equalsIgnoreCase("view")) {
            assertResultMessage(ViewCommand.MESSAGE_USAGE);
        }
    }
}

@@ -402,16 +402,67 @@
 Command;
+%0Aimport seedu.address.logic.commands.ViewOnCommand;
 %0A%0Apublic
@@ -1840,32 +1840,70 @@
 nd.MESSAGE_USAGE
+ + %22%5Cn%22 +  ViewOnCommand.MESSAGE_USAGE
 );%0A        %7D%0A   

Fix help command test