-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize EditClientCommand error msgs #318
Conversation
Codecov ReportBase: 63.26% // Head: 63.17% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #318 +/- ##
============================================
- Coverage 63.26% 63.17% -0.09%
Complexity 650 650
============================================
Files 112 112
Lines 2273 2273
Branches 266 268 +2
============================================
- Hits 1438 1436 -2
- Misses 736 737 +1
- Partials 99 100 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -82,7 +83,9 @@ public CommandResult execute(Model model) throws CommandException { | |||
Client clientToEdit = lastShownList.get(index.getZeroBased()); | |||
Client editedClient = createEditedClient(clientToEdit, editClientDescriptor); | |||
|
|||
if (!clientToEdit.isSameClient(editedClient) && model.hasClient(editedClient)) { | |||
if (clientToEdit.equals(editedClient)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good implementation of differentiating changes or no changes
// no field specified | ||
assertParseFailure(parser, " i/1", EditClientCommand.MESSAGE_NOT_EDITED); | ||
String expectedMessage = String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditClientCommand.MESSAGE_USAGE); | ||
assertParseFailure(parser, VALID_NAME_AMY, expectedMessage); | ||
|
||
// no index and no field specified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a sidenote, in keeping with the heuristic to test one at a time, you might want to separate this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okk
No description provided.