Skip to content

Commit

Permalink
Edit error message for DeleteWeddingCommand.java
Browse files Browse the repository at this point in the history
Edit error message for consistency.
  • Loading branch information
HanB1n committed Oct 23, 2024
1 parent 3e1637b commit 111b582
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@ public CommandResult execute(Model model) throws CommandException {
} else {
throw new CommandException(
String.format(MESSAGE_DELETE_WEDDING_FAILURE_STILL_USED,
Messages.format(targetWedding)));
Messages.format(targetWedding))
+ ".\n"
+ Messages.MESSAGE_FORCE_DELETE_WEDDING
);
}
}
}
}
model.updateFilteredWeddingList(Model.PREDICATE_SHOW_ALL_WEDDINGS);
throw new CommandException(String.format(MESSAGE_DELETE_WEDDING_FAILURE_NOT_FOUND,
Messages.format(targetWedding)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class DeleteWeddingCommandTest {
private Model model = new ModelManager(getTypicalAddressBook(), new UserPrefs());

@Test
public void execute_validDeleteWeddingCommand_success() {
public void execute_validDeleteWeddingCommand() {
Wedding weddingToDelete = model.getFilteredWeddingList().get(0);
DeleteWeddingCommand deleteWeddingCommand = new DeleteWeddingCommand(weddingToDelete);

Expand Down

0 comments on commit 111b582

Please sign in to comment.