Skip to content

Commit

Permalink
ParserManagerTest: Update JUnit test for view command (CS2113-AY1819S…
Browse files Browse the repository at this point in the history
  • Loading branch information
dingheng4448 authored and seanieyap committed Apr 1, 2019
1 parent 7852a46 commit ff24940
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/java/planmysem/logic/parser/ParserManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import planmysem.logic.commands.HelpCommand;
import planmysem.logic.commands.ImportCommand;
import planmysem.logic.commands.ListCommand;
import planmysem.logic.commands.ViewCommand;
import planmysem.model.recurrence.Recurrence;
import planmysem.model.slot.Slot;

Expand Down Expand Up @@ -177,6 +178,17 @@ public void parseCommand_export() throws Exception {
public void parseCommand_import() throws Exception {
assertTrue(parser.parseCommand(ImportCommand.COMMAND_WORD + " /test/data/ImportExportTest/importTest.ics\"") instanceof ImportCommand);
}

@Test
public void parseCommand_view() throws Exception {
//assertTrue(parser.parseCommand(ViewCommand.COMMAND_WORD) instanceof ViewCommand);
ViewCommand command = (ViewCommand) parser.parseCommand(ViewCommand.COMMAND_WORD + " month");
assertEquals(new ViewCommand(new String[]{"month"}), command);

ViewCommand commandShort = (ViewCommand) parser.parseCommand(ViewCommand.COMMAND_WORD_SHORT + " month");
assertEquals(new ViewCommand(new String[]{"month"}), commandShort);
}

//
// @Test
// public void parseCommand_find() throws Exception {
Expand Down

0 comments on commit ff24940

Please sign in to comment.