Skip to content

Commit

Permalink
Merge pull request nus-cs2103-AY2021S1#81 from jerrylchong/branch-Lis…
Browse files Browse the repository at this point in the history
…t-Contacts

Update ListCommand to use 'contact list' command and add back parseCommand list test
  • Loading branch information
EkamSinghPandher authored Oct 7, 2020
2 parents 37010ed + f6f0d80 commit 0e1846b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
public class ListCommand extends Command {

public static final String COMMAND_WORD = "list";
public static final String COMMAND_WORD = "contact list";

public static final String MESSAGE_SUCCESS = "Listed all persons";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import seedu.address.logic.commands.ClearCommand;
import seedu.address.logic.commands.ExitCommand;
import seedu.address.logic.commands.HelpCommand;
import seedu.address.logic.commands.ListCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.Person;
import seedu.address.testutil.PersonBuilder;
Expand Down Expand Up @@ -70,11 +71,11 @@ public void parseCommand_help() throws Exception {
assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + " 3") instanceof HelpCommand);
}

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

@Test
public void parseCommand_unrecognisedInput_throwsParseException() {
Expand Down

0 comments on commit 0e1846b

Please sign in to comment.