Skip to content

Commit

Permalink
Add Test Case
Browse files Browse the repository at this point in the history
Added additional test cases for UniMateParserTest
  • Loading branch information
nicrandomlee committed Oct 18, 2023
1 parent 34fe0d3 commit 2aa32da
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.commands.HelpCommand;
import seedu.address.logic.commands.ListCommand;
import seedu.address.logic.commands.SortCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.NameContainsKeywordsPredicate;
import seedu.address.model.person.Person;
Expand Down Expand Up @@ -88,6 +89,12 @@ public void parseCommand_list() throws Exception {
assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + " 3") instanceof ListCommand);
}

@Test
public void parseCommand_sort() throws Exception {
assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD) instanceof SortCommand);
assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + " 3") instanceof SortCommand);
}

@Test
public void parseCommand_unrecognisedInput_throwsParseException() {
assertThrows(ParseException.class, String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE), ()
Expand Down

0 comments on commit 2aa32da

Please sign in to comment.