-
Notifications
You must be signed in to change notification settings - Fork 185
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
[W5.4][T14-A4]Melanie Ng #910
base: master
Are you sure you want to change the base?
Conversation
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.
Unfortunately, you're still missing your JUnit tests, so I can't give you the marks.
@@ -41,6 +41,8 @@ Format: `list` | |||
## Finding all persons containing any keyword in their name: `find` | |||
Finds persons whose names contain any of the given keywords.<br> | |||
Format: `find KEYWORD [MORE_KEYWORDS]` | |||
Finds person with their recorded phone number. <br> |
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.
Editing line 42 rather than writing this line out will make your function description clearer
@@ -41,6 +41,8 @@ Format: `list` | |||
## Finding all persons containing any keyword in their name: `find` |
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.
The title should be changed since the functionality of find has been expanded.
I am not sure what went wrong with the Junit 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.
Your JUnit tests don't test your functionality at all, and your tests don't pass, and as such I can't give you the marks. Please fix these problems.
Read the original test code again and try to understand what it does. If you have any difficulty understanding any concepts please do ask.
public void execute_find_matchesIfAnyKeywordPresent() throws Exception { | ||
TestDataHelper helper = new TestDataHelper(); | ||
Person pTarget1 = helper.generatePersonWithName("bla bla KEY bla"); | ||
Person pTarget2 = helper.generatePersonWithName("bla rAnDoM bla bceofeia"); | ||
Person p1 = helper.generatePersonWithName("key key"); | ||
Person p2 = helper.generatePersonWithName("KEy sduauo"); | ||
Person pTarget3 = helper.generatePersonWithName("12345678"); | ||
Person pTarget4 = helper.generatePersonWithName("87654321"); |
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.
These 2 lines create Person objects with the argument becoming the name, not the phone number.
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, your test should be in a separate function because it tests a separate functionality from yours.
assertCommandBehavior("find KEY rAnDoM", | ||
Command.getMessageForPersonListShownSummary(expectedList), | ||
expectedAB, | ||
true, | ||
expectedList); | ||
|
||
assertCommandBehavior("find 12348765", |
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.
Does this really test your functionality of finding by number? Is 12348765 the name or phone number of pTarget3/pTarget4?
update user guide