Skip to content

Commit

Permalink
Add invalid sync
Browse files Browse the repository at this point in the history
  • Loading branch information
burnflare committed Nov 6, 2016
1 parent f8f105d commit 1454031
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class SyncCommand extends Command {
public static final String SYNC_ON_MESSAGE = "Google Calendar Sync is on";
public static final String SYNC_OFF_MESSAGE = "Google Calendar Sync is off";

private static final String MESSAGE_WRONG_OPTION = "Invalid option for sync.";
public static final String MESSAGE_WRONG_OPTION = "Invalid option for sync.";

private boolean syncOption;

Expand Down
6 changes: 6 additions & 0 deletions src/test/java/seedu/agendum/logic/LogicManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import seedu.agendum.commons.core.Config;
import seedu.agendum.commons.core.EventsCenter;
import seedu.agendum.commons.core.UnmodifiableObservableList;
import seedu.agendum.commons.exceptions.IllegalValueException;
import seedu.agendum.logic.commands.*;
import seedu.agendum.commons.events.ui.ShowHelpRequestEvent;
import seedu.agendum.commons.util.FileUtil;
Expand Down Expand Up @@ -421,6 +422,11 @@ public void execute_syncOff_successfull() throws Exception {
SyncCommand.SYNC_OFF_MESSAGE);
}

@Test
public void execute_syncUnknown_exception() throws Exception {
assertCommandBehavior("sync something", SyncCommand.MESSAGE_WRONG_OPTION, new ToDoList(), Collections.emptyList());
}


//@@author A0148095X
@Test
Expand Down

0 comments on commit 1454031

Please sign in to comment.