Skip to content

Commit

Permalink
Merge pull request #142 from raydenlim/branch-fix-message-bug
Browse files Browse the repository at this point in the history
Fix return message bug
  • Loading branch information
raydenlim authored Nov 2, 2023
2 parents 2410b47 + 7ea8bb1 commit 2c1d02c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public CommandResult execute(Model model) throws CommandException {

model.setPerson(personToEdit, editedPerson);
model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);
return new CommandResult(String.format(MESSAGE_EDIT_GRADEDTEST_SUCCESS, editedPerson), COMMAND_TYPE);
return new CommandResult(String.format(MESSAGE_EDIT_GRADEDTEST_SUCCESS,
Messages.format(editedPerson)), COMMAND_TYPE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public void execute_editGradedTest_success() {
Person editedPerson = editGradedTestCommand.createEditedGradedTestPerson(personToEdit);

// Define the expected message
String expectedMessage = String.format(EditGradedTestCommand.MESSAGE_EDIT_GRADEDTEST_SUCCESS, editedPerson);
String expectedMessage = String.format(EditGradedTestCommand.MESSAGE_EDIT_GRADEDTEST_SUCCESS,
Messages.format(editedPerson));

// Create a new model with the expected changes
Model expectedModel = new ModelManager(new AddressBook(model.getAddressBook()),
Expand Down Expand Up @@ -106,7 +107,8 @@ public void execute_editGradedTestDefaultValues_success() {
Person editedPerson = editGradedTestCommand.createEditedGradedTestPerson(personToEdit);

// Define the expected message
String expectedMessage = String.format(EditGradedTestCommand.MESSAGE_EDIT_GRADEDTEST_SUCCESS, editedPerson);
String expectedMessage = String.format(EditGradedTestCommand.MESSAGE_EDIT_GRADEDTEST_SUCCESS,
Messages.format(editedPerson));

// Create a new model with the expected changes
Model expectedModel = new ModelManager(new AddressBook(model.getAddressBook()),
Expand Down

0 comments on commit 2c1d02c

Please sign in to comment.