diff --git a/test/java/seedu/addressbook/logic/LogicTest.java b/test/java/seedu/addressbook/logic/LogicTest.java index 666fdc653..7efa921ca 100644 --- a/test/java/seedu/addressbook/logic/LogicTest.java +++ b/test/java/seedu/addressbook/logic/LogicTest.java @@ -220,10 +220,8 @@ public void execute_view_invalidIndex() throws Exception { */ private void assertInvalidIndexBehaviorForCommand(String commandWord) throws Exception { String expectedMessage = Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX; - List lastShownList = new ArrayList<>(); TestDataHelper helper = new TestDataHelper(); - lastShownList.add(helper.generatePerson(1, false)); - lastShownList.add(helper.generatePerson(2, true)); + List lastShownList = helper.generatePersonList(false, true); logic.setLastShownList(lastShownList);