Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

NgSuli
Copy link

@NgSuli NgSuli commented Sep 28, 2017

update user guide

Copy link

@ang-zy ang-zy left a 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>
Copy link

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`
Copy link

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.

@NgSuli
Copy link
Author

NgSuli commented Oct 13, 2017

I am not sure what went wrong with the Junit test.

Copy link

@ang-zy ang-zy left a 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");
Copy link

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.

Copy link

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",
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants