-
Notifications
You must be signed in to change notification settings - Fork 141
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
[W6.4D][T16-B1]Qiu Haoze #762
base: master
Are you sure you want to change the base?
Conversation
Hi @qiuhaohao, your pull request title is invalid. For phase A, it should be in the format of For phase B, it should be in the format of Please follow the instructions given strictly and edit your title for reprocessing. Submit only one learning outcome per pull request (unless otherwise stated in instructions) and do remember to create your branches from the commit where the Note: this comment is posted by a bot. If you believe this is done in error, please create an issue at cs2103-pr-bot and add a link to this PR. |
@@ -70,4 +70,8 @@ public int getTargetIndex() { | |||
public void setTargetIndex(int targetIndex) { | |||
this.targetIndex = targetIndex; | |||
} | |||
|
|||
public boolean isMutating() { |
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.
is it a good idea to have a default in the super class?
@@ -90,7 +91,9 @@ private void assertCommandBehavior(String inputCommand, | |||
//Confirm the state of data is as expected | |||
assertEquals(expectedAddressBook, addressBook); | |||
assertEquals(lastShownList, logic.getLastShownList()); | |||
assertEquals(addressBook, saveFile.load()); | |||
if (new Parser().parseCommand(inputCommand).isMutating()){ |
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.
why need a new instance?
Does this way test if non-mutating commands skip save?
Exercice in polymorphism