Skip to content

Commit

Permalink
Merge pull request #259 from SooYap/fix-group-test-case
Browse files Browse the repository at this point in the history
Fix group test case
  • Loading branch information
ghos7ie authored Nov 4, 2024
2 parents 99b692f + c289221 commit 9068c3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void execute_zeroKeywords_noStudentFound() {

@Test
public void execute_singleKeyword_multipleStudentsFound() {
String expectedMessage = String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 2);
String expectedMessage = String.format(MESSAGE_STUDENTS_LISTED_OVERVIEW, 2);
StudentMatchesQueryPredicate predicate = new StudentMatchesQueryPredicate(List.of("Alice", "A0888888M"));
FindStudentCommand command = new FindStudentCommand(predicate);
expectedModel.updateFilteredPersonList(predicate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.commons.util.JsonUtil;
import seedu.address.model.AddressBook;
import seedu.address.testutil.TypicalGroups;
import seedu.address.testutil.TypicalPersons;

public class JsonSerializableAddressBookTest {
Expand Down Expand Up @@ -63,13 +64,12 @@ public void toModelType_invalidGroupFile_throwsIllegalValueException() throws Ex
}


// @Test
// public void toModelType_typicalGroupsFile_success() throws Exception {
// JsonSerializableAddressBook dataFromFile = JsonUtil.readJsonFile(TYPICAL_GROUPS_FILE,
// JsonSerializableAddressBook.class).get();
// AddressBook addressBookFromFile = dataFromFile.toModelType();
// AddressBook typicalPersonsAddressBook = TypicalGroups.getTypicalAddressBook();
// assertEquals(addressBookFromFile, typicalPersonsAddressBook);
// }

@Test
public void toModelType_typicalGroupsFile_success() throws Exception {
JsonSerializableAddressBook dataFromFile = JsonUtil.readJsonFile(TYPICAL_GROUPS_FILE,
JsonSerializableAddressBook.class).get();
AddressBook addressBookFromFile = dataFromFile.toModelType();
AddressBook typicalPersonsAddressBook = TypicalGroups.getTypicalAddressBook();
assertEquals(addressBookFromFile, typicalPersonsAddressBook);
}
}
2 changes: 1 addition & 1 deletion src/test/java/seedu/address/testutil/TypicalGroups.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public static AddressBook getTypicalAddressBook() {
ab.addGroup(new Group(new GroupName(TEAM_FOUR)));
ab.addGroup(new Group(new GroupName(TEAM_THREE)));
ab.addGroup(new Group(new GroupName(TEAM_TWO)));
ab.addGroup(new Group(new GroupName(GROUP_ONE)));
ab.addGroup(new Group(new GroupName(TEAM_ONE)));
ab.addGroup(new Group(new GroupName(GROUP_ONE)));
ab.addGroup(new Group(new GroupName(GROUP_TEN)));
return ab;
}
Expand Down

0 comments on commit 9068c3c

Please sign in to comment.