Skip to content

Commit

Permalink
Fix return message bug
Browse files Browse the repository at this point in the history
  • Loading branch information
raydenlim committed Nov 1, 2023
1 parent 2410b47 commit 7ea8bb1
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 7ea8bb1

Please sign in to comment.