-
Notifications
You must be signed in to change notification settings - Fork 4
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 view command #111
Add view command #111
Conversation
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
============================================
+ Coverage 69.45% 69.99% +0.53%
- Complexity 538 551 +13
============================================
Files 87 89 +2
Lines 1814 1853 +39
Branches 211 217 +6
============================================
+ Hits 1260 1297 +37
- Misses 507 508 +1
- Partials 47 48 +1
Continue to review full report at Codecov.
|
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.
Apart from minor comments, LGTM
import seedu.clinic.model.attribute.NameContainsKeywordsPredicateForSupplier; | ||
import seedu.clinic.model.attribute.NameContainsKeywordsPredicateForWarehouse; | ||
|
||
public class ViewCommand extends 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.
To do javadocs
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.
Thanks for pointing this out, missed out on the javadocs comment for class!
@@ -2,7 +2,7 @@ | |||
"_comment": "Clinic save file which contains the same supplier values as in TypicalSuppliers#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.
comment should be updated as well
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, will updated in next commit as well.
@@ -32,8 +34,14 @@ public void execute_listIsNotFiltered_showsSameList() { | |||
} | |||
|
|||
@Test | |||
public void execute_listIsFiltered_showsEverything() { | |||
public void execute_listIsFilteredSupplier_showsEverythingWarehouseShowOneSupplier() { |
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 think the naming for this is a bit confusing, at least at first glance, perhaps can change everything to all
|
||
@Test | ||
public void parse_correctTypeCorrectKeyWords_success() { | ||
ViewCommand expectedViewCommand1 = new ViewCommand("supplier", Arrays.asList(new String[] |
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 think you can just use list.of() instead of arrays.aslist(String[]{})
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.
Thanks for the suggestion, let me try to use that instead of arrays.aslist(String[]{})
@@ -80,6 +81,9 @@ public static Clinic getTypicalClinic() { | |||
for (Supplier supplier : getTypicalSuppliers()) { | |||
ab.addSupplier(supplier); |
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.
ab used to stand for addressbook, now it has no meaning so i think it should be changed
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
…ommand Add view command
…ommand Add view command
…ommand Add view command
…ommand Add view command
View Command has been implemented, and list command as been edited.
Also amended the first entry of json file/typical warehouses since a match by first word of name in list test would result in finding for the word (warehouse), which would cause all 7 entries to be found by the predicate function.
Edited User Guide to include list command, have also updated the developer guide for list command's use case.