package guitests;

import org.junit.Test;

import seedu.taskboss.commons.core.Messages;
import seedu.taskboss.logic.commands.SaveCommand;

//@@author A0138961W
public class SaveCommandTest extends TaskBossGuiTest {

    @Test
    public void save() {
        //invalid filepath
        commandBox.runCommand("save C://user/desktop/^*+#");
        assertResultMessage(SaveCommand.MESSAGE_INVALID_FILEPATH);

        //valid filepath
        commandBox.runCommand("save C://user/desktop/taskboss");
        assertResultMessage(SaveCommand.MESSAGE_SUCCESS);

        //valid filepath using short command
        commandBox.runCommand("sv C://user/desktop/taskboss");
        assertResultMessage(SaveCommand.MESSAGE_SUCCESS);

        //invalid command
        commandBox.runCommand("saveC://user/desktop/taskboss");
        assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);
    }
}

@@ -12,16 +12,100 @@
 tests;%0A%0A
+import static seedu.taskboss.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;%0A%0A
 import o
@@ -119,16 +119,16 @@
 t.Test;%0A
-
 %0Aimport 
@@ -480,24 +480,198 @@
 FILEPATH);%0A%0A
+        //invalid filepath using short command%0A        commandBox.runCommand(%22sv C://user/desktop/%5E*+#%22);%0A        assertResultMessage(SaveCommand.MESSAGE_INVALID_FILEPATH);%0A%0A
         //va
@@ -1056,32 +1056,32 @@
 top/taskboss%22);%0A
-
         assertRe
@@ -1127,16 +1127,373 @@
 MMAND);%0A
+%0A        //empty filepath%0A        commandBox.runCommand(%22save%22);%0A        assertResultMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SaveCommand.MESSAGE_USAGE));%0A%0A        //missing filepath using short command%0A        commandBox.runCommand(%22sv%22);%0A        assertResultMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SaveCommand.MESSAGE_USAGE));%0A%0A
     %7D%0A%7D%0A

Add new test cases