-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add unit tests for ViewAllCommand and ViewCommand classes #111 #131
Conversation
Usually, we have one test class for each functional class |
Ready for review, two tests are roughly the same Here are some of my questions: in
Same things apply to |
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.
Added comments to one test class. Can revise the other based on the same comments.
new Phone("1234567", true), | ||
new Email("[email protected]", false), | ||
new Address("Newgate Prison", true), | ||
new UniqueTagList(new Tag("friend"), new Tag("criminal"))); |
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.
Two persons is a bit a special case because the list doesn't have persons in the middle. A 3-person list is more general.
emptyDisplayList = TestUtil.createList(); | ||
listWithAll = TestUtil.createList(johnDoe, betsyCrowe); | ||
listWithSome = TestUtil.createList(betsyCrowe); | ||
} |
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.
Extract into a TypicalPersons
utility class?
// non-empty addressbook | ||
assertViewAllErrorInvalidIndex(addressBook, listWithAll, -1); | ||
assertViewAllErrorInvalidIndex(addressBook, listWithAll, 0); | ||
assertViewAllErrorInvalidIndex(addressBook, listWithAll, 3); |
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.
if you use size()+1
of the list instead of magic number 3
, the test will be less brittle (less likely to break in future).
* Executes the command, and asserts the result message is as expected. | ||
*/ | ||
private void assertCommandResult(Command command, String expectedMessage, | ||
AddressBook addressBook) { |
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.
Do you need this line break?
* and displayed. | ||
*/ | ||
private void assertViewAllSuccess(AddressBook addressBook, List<ReadOnlyPerson> list, int index) { | ||
String expectedMessage = String.format(ViewAllCommand.MESSAGE_VIEW_PERSON_DETAILS, list.get(index - 1).getAsTextShowAll()); |
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.
Line too long?
@zzzzwen Yes, you can move common methods to TestUtil class. |
e.printStackTrace(); | ||
assert false : "not possible"; | ||
} | ||
} |
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.
There is another similar class in #120 that might be merged before this. May be you can follow the same? Note how the person names follow a pattern. e.g. First person has initials A B, second one B C, and so on. Even the address follows a pattern and not random. Such patterns help us detect when things go out of place.
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.
@damithc So I wait for the other pr to merge first then use and edit his TypicalPersons
for the test?
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.
Since we both have same class created
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.
That class is mostly stable now, so you can copy-paste-modify that code into your and continue with your PR. If that PR is merged first, you'll have to update your branch and de-conflict your class a bit at that point.
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.
ok
Updated, I will leave it here first, after merging #120 I will resolve the conflict |
into 111-unit-test-view-viewall # Conflicts: # test/java/seedu/addressbook/util/TypicalPersons.java
Updated, ready for review |
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.
Some comments added.
public void setUp() throws Exception { | ||
TypicalPersons td = new TypicalPersons(); | ||
|
||
emptyAddressBook = TestUtil.createAddressBook(); |
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.
This can be initialized at the same place it's declared. Junit creates a new instance for each test.
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.
@damithc This TestUtil.createAddressBook()
is throwing an excpetion in TestUtil
Class so cannot put outside right?
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.
In that case can keep.
TypicalPersons td = new TypicalPersons(); | ||
|
||
emptyAddressBook = TestUtil.createAddressBook(); | ||
addressBook = td.getTypicalAddressBook(); |
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.
Same for 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.
This comment was intended for the line below. Sorry.
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.
Also note #134
|
||
emptyDisplayList = TestUtil.createList(); | ||
listWithAll = td.getListWithAllPersons(); | ||
listWithSome = td.getListWithSomePersons(); |
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.
On a related note, lines 32, 35, 38, 39, should have been put together as they are connected. i.e. declaring a variable and then using it.
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.
noted
} | ||
|
||
/** | ||
* Asserts that the details person at specific index can be successfully retrieved |
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.
details of the
?
|
||
Command command = generateViewAllCommand(addressBook, list, index); | ||
assertCommandResult(command, expectedMessage, addressBook, TestUtil.clone(addressBook)); | ||
} |
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.
Can the common part of the above two methods can be extracted as a method?
Command command = generateViewCommand(addressBook, list, index); | ||
assertCommandResult(command, expectedMessage, addressBook, TestUtil.clone(addressBook)); | ||
} | ||
} |
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.
If this class is almost the same as the other test class, we can text both commands in one of the class and make the other class empty with just a comment to explain why it is empty.
* Executes the command, and asserts the result message is as expected. | ||
*/ | ||
public static void assertCommandResult(Command command, String expectedMessage, AddressBook addressBook, | ||
AddressBook expectedAddressBook) { |
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.
More readable indentation:
public static void assertCommandResult(Command command, String expectedMessage, AddressBook addressBook,
AddressBook expectedAddressBook) {
return list; | ||
} | ||
} | ||
|
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.
Add a line feed at the end of the file
return ab; | ||
} | ||
|
||
} |
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.
Not sure why this is shown as a diff. Most of it looks identical.
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.
oh, this is because there is an extra whitespace for each line, sorry
Updated |
Removed use of |
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.
Much better. Some comments added.
assertViewSuccess(addressBook, listWithAll, 1); | ||
|
||
// person with some private information | ||
assertViewSuccess(addressBook, listWithAll, 2); |
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.
You need a person with all info private, to confirm that 'privacy' works for each relevant field.
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.
@damithc In TypicalPersons
I have a person called dan
, all the information which has the private/public option for him is private.
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.
I meant such a person must be included as one of the test cases in this method. Your comment in line 74 says some private information
so I guess that's not dan.
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.
oh, I get it
} | ||
|
||
/** | ||
* Creates a new View command. |
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.
ViewCommand
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.
Actually, this comment doesn't add much value. Can be removed.
|
||
expectedMessage = String.format(ViewCommand.MESSAGE_VIEW_PERSON_DETAILS, | ||
list.get(index - 1).getAsTextShowAll()); | ||
assertViewAllCommandBehaviour(addressBook, list, expectedMessage, index); |
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.
index - 1
appears twice. Assign to local variable?
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.
I feel that a new local variable, eg, pos = index - 1
doesn't add much value since index-1
just refer to the position in the list and won't be changed. Is it necessary to extract to a local variable?
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.
By local, I meant inside the method. Reasons,
- It's not good when a calculation is duplicated.
- its meaning is not immediately clear.
Something like this will help clear both problems.
int internalIndex = index - 1; // because index is one-indexed
String expectedMessage = Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX; | ||
|
||
assertViewCommandBehaviour(addressBook, list, expectedMessage, index); | ||
assertViewAllCommandBehaviour(addressBook, list, expectedMessage, index); |
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.
Can be simplified as this (after extracting common part of this and next method)?
assertCommandError(addressBook, list, index, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX)
/** | ||
* Asserts that the View command gives correct feedback information | ||
*/ | ||
private void assertViewCommandBehaviour(AddressBook addressBook, List<ReadOnlyPerson> list, String message, int index) { |
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.
Reorder parameters so that the three input values come first?
message
-> expectedMessage
* Executes the command, and asserts the result message is as expected. | ||
*/ | ||
public static void assertCommandResult(Command command, String expectedMessage, AddressBook addressBook, | ||
AddressBook expectedAddressBook) { |
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.
Similarly, can reorder parameters so that input comes first and expected values come next.
import seedu.addressbook.data.tag.UniqueTagList; | ||
|
||
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.
Remove extra space?
List<ReadOnlyPerson> list = getListWithAllPersons(); | ||
list.remove(0); //remove a person in the list | ||
return list; | ||
} |
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.
This method is very specific to your test class and therefore not a good abstraction. Try something like this instead:
public List<ReadOnlyPerson> getList(ReadOnlyPerson... personsToInclude)
;
Can be used like this:
getList(td.amy, td.candy);
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.
noted
Updated, but ViewCommand and ViewAllCommand are two separate commands and my original idea is to split them into two different blocks of methods to show they are different. |
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.
Please configure your editor to strip all trailing whitespace and mark out the 110 character boundary.
* Asserts that the ViewCommand and ViewAllCommand show given feedback information | ||
*/ | ||
private static void assertViewBehavior(Command viewCommand, AddressBook addressBook, | ||
List<ReadOnlyPerson> list, String expectedMessage) { |
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.
Indent this further to the right.
@@ -75,4 +78,5 @@ public static void assertTextFilesEqual(Path path1, Path path2) throws IOExcepti | |||
List<String> list2 = Files.readAllLines(path2, Charset.defaultCharset()); | |||
assertEquals(String.join("\n", list1), String.join("\n", list2)); | |||
} | |||
|
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.
Unnecessary change.
|
||
public class ViewCommandTest { | ||
private TypicalPersons td = new TypicalPersons(); | ||
|
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.
Trailing whitespace
// non-empty addressbook | ||
assertViewErrorInvalidIndex(typicalAddressBook, displayListWithAllTypicalPersons, -1); | ||
assertViewErrorInvalidIndex(typicalAddressBook, displayListWithAllTypicalPersons, 0); | ||
assertViewErrorInvalidIndex(typicalAddressBook, displayListWithAllTypicalPersons, displayListWithAllTypicalPersons.size() + 1); |
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.
Overlong line way above 110 chars.
new Email("[email protected]", true), | ||
new Address("nus", false), | ||
new UniqueTagList(Collections.emptySet())); | ||
List <ReadOnlyPerson> displayListWithExtraPerson = new ArrayList<ReadOnlyPerson>(displayListWithAllTypicalPersons); |
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.
Overlong line way above 110 chars.
assertViewErrorPersonNotInAddressBook(emptyAddressBook, displayListWithExtraPerson, 1); | ||
|
||
// non-empty addressbook | ||
assertViewErrorPersonNotInAddressBook(typicalAddressBook, displayListWithExtraPerson, displayListWithExtraPerson.size()); |
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.
Overlong line way above 110 chars.
/** | ||
* Asserts that both a ViewCommand and a ViewAllCommand can retrieve from | ||
* the {@code addressBook} details of the person at the given {@code index} in the given {@code list}. | ||
* |
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.
Trailing whitespace.
@zzzzwen I notice you are still using the Maybe Otherwise, please change all your naming to use |
Configured and updated. Replaced all with parameters in |
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.
There are still lots of references to displayList
in the code. I've suggested some alternatives, or you can think up of your own as long as they don't introduce new terminology not used in the existing code base.
|
||
private AddressBook typicalAddressBook = td.getTypicalAddressBook(); | ||
private AddressBook emptyAddressBook = TestUtil.createAddressBook(); | ||
private List<ReadOnlyPerson> emptyDisplayList = Collections.emptyList(); |
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.
Maybe rename emptyDisplayList
to emptyPersonList
.
private AddressBook typicalAddressBook = td.getTypicalAddressBook(); | ||
private AddressBook emptyAddressBook = TestUtil.createAddressBook(); | ||
private List<ReadOnlyPerson> emptyDisplayList = Collections.emptyList(); | ||
private List<ReadOnlyPerson> displayListWithAllTypicalPersons = Arrays.asList(td.getTypicalPersons()); |
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.
Maybe rename displayListWithAllTypicalPersons
to allTypicalPersonsList
or listWithAllTypicalPersons
.
private AddressBook emptyAddressBook = TestUtil.createAddressBook(); | ||
private List<ReadOnlyPerson> emptyDisplayList = Collections.emptyList(); | ||
private List<ReadOnlyPerson> displayListWithAllTypicalPersons = Arrays.asList(td.getTypicalPersons()); | ||
private List<ReadOnlyPerson> listWithSome = Arrays.asList(td.amy, td.candy, td.dan); |
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.
Maybe rename listWithSome
to listWithSomeTypicalPersons
.
new Email("[email protected]", true), | ||
new Address("nus", false), | ||
new UniqueTagList(Collections.emptySet())); | ||
List <ReadOnlyPerson> displayListWithExtraPerson |
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.
Can just be listWithExtraPerson
. Also, remove the space in List <ReadOnlyPerson>
.
|
||
@Test | ||
public void execute_personNotInAddressBook_returnsPersonNotInAddressBookMessage() throws Exception { | ||
// generate person not in addressbook, add to displayList |
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.
More descriptive: generate list with person not in addressbook
.
* Asserts that the details of person at specific index cannot be retrieved due to | ||
* invalid index. | ||
*/ | ||
private void assertViewErrorInvalidIndex(AddressBook addressBook, List<ReadOnlyPerson> list, |
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.
Rename list
to relevantPersons
.
* Asserts that the details of person at specific index cannot be retrieved due to | ||
* person not existing in the addressbook. | ||
*/ | ||
private void assertViewErrorPersonNotInAddressBook(AddressBook addressBook, List<ReadOnlyPerson> list, |
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.
Rename list
to relevantPersons
.
} | ||
|
||
/** | ||
* Asserts that the ViewCommand and ViewAllCommand show given feedback information |
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.
It does not just check for feedback information. You may wish to enumerate the list of things it checks for, e.g.
Checks that viewCommand exhibits the correct view command behavior, namely:
1. The feedback message of the CommandResult it returns matches expectedMessage
2. The CommandResult it returns has no relevant persons.
3. ...
Updated, the |
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, just a few nits. I think everything else looks fine.
|
||
/** | ||
* Asserts that both a ViewCommand and a ViewAllCommand can retrieve from | ||
* the {@code addressBook} details of the person at the given {@code index} in the given {@code list}. |
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.
Change {@code index}
to {@code targetVisibleIndex}
?
Change {@code list}
to {@code relevantPersons} list
?
*/ | ||
private void assertViewErrorInvalidIndex(AddressBook addressBook, List<ReadOnlyPerson> relevantPersons, | ||
int targetVisibleIndex) { | ||
assertViewError(addressBook, relevantPersons, targetVisibleIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX); |
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.
This line is much longer than 110 chars.
*/ | ||
private void assertViewSuccess(AddressBook addressBook, List<ReadOnlyPerson> relevantPersons, | ||
int targetVisibleIndex) { | ||
ReadOnlyPerson personToBeViewed = relevantPersons.get(targetVisibleIndex - 1); // -1 is because index is one-indexed |
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.
This line is much longer than 110 chars.
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.
We could put it like that:
// -1 is because index is one-indexed
ReadOnlyPerson personToBeViewed = relevantPersons.get(targetVisibleIndex - 1);
but imo that looks weird because usually a comment at the code block describes what the code below overall does, but in this case all we are doing is just commenting on the use of -1
.
So maybe we need to add a description on what the code below does, even though it may be obvious. So something like:
// Get person to be viewed (targetVisibleIndex - 1 because index is one-indexed)
ReadOnlyPerson personToBeViewed = relevantPersons.get(targetVisibleIndex - 1);
Updated |
@zzzzwen the |
oh, added |
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 work.
@damithc Can reconfirm your approval? PR has changed since your last review. |
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.
Looks good. A few cosmetic nits only.
assertViewErrorInvalidIndex(typicalAddressBook, listWithAllTypicalPersons, -1); | ||
assertViewErrorInvalidIndex(typicalAddressBook, listWithAllTypicalPersons, 0); | ||
assertViewErrorInvalidIndex(typicalAddressBook, listWithAllTypicalPersons, | ||
listWithAllTypicalPersons.size() + 1); |
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.
Minor nit: indent for better readability. This way, (
and )
that demarcate the parameter list appear on far left and far right of the parameters, respectively.
assertViewErrorInvalidIndex(typicalAddressBook, listWithAllTypicalPersons,
listWithAllTypicalPersons.size() + 1);
This applies to a few other places as well.
@Test | ||
public void execute_personNotInAddressBook_returnsPersonNotInAddressBookMessage() throws Exception { | ||
// generate list with person not in addressbook, add to list | ||
ReadOnlyPerson someone = new Person(new Name("me"), |
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.
someone
--> stranger
?
assertViewSuccess(typicalAddressBook, listWithAllTypicalPersons, 4); | ||
|
||
// addressbook has more people than the list | ||
// This can happen when view from filtered list caused by some commands(eg. FindCommand) |
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.
This sentence is not very clear.
This can happen when a command causes the list to show only a sub-set of persons (e.g. FindCommand).
Also, full sentences should end with full stop.
*/ | ||
private void assertViewSuccess(AddressBook addressBook, List<ReadOnlyPerson> relevantPersons, | ||
int targetVisibleIndex) { | ||
// Get person to be viewed (targetVisibleIndex - 1 because index is one-indexed) |
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.
get
(to be consistent with other comments in this class)?
Updated |
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.
One minor nit remaining
// addressbook has more people than the list | ||
// This can happen when view from filtered list caused by some commands(eg. FindCommand) | ||
// addressbook has more people than the list. | ||
// this can happen when a command causes the list to show only a sub-set of persons(e.g. FindCommand). |
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.
Full sentences should start with a upper case letter too. :-) So it should either a full sentence starting with a upper case letter and ending with a full stop, or just a short phrase starting with a lower case letter and no full stop at the end.
ok |
@damithc Any more comments for this PR? |
code ideas and format follow
DeleteCommandTest
Adding header comments later
For ViewAll command, should I do it in a separate file or together with view command
Fixes #111