-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adjust person duplicate #222
Adjust person duplicate #222
Conversation
Codecov ReportAttention: Patch coverage is
|
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.
LGTM
Just make sure to resolve the merge conflicts and we should be able to merge this in.
// same name, all other attributes different -> returns true | ||
// same name, all other attributes different -> returns False | ||
Person editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB) | ||
.withAddress(VALID_ADDRESS_BOB).withStatus(VALID_STATUS_BOB).withTags(VALID_TAG_HUSBAND).build(); | ||
assertTrue(ALICE.isSamePerson(editedAlice)); | ||
assertFalse(ALICE.isSamePerson(editedAlice)); | ||
|
||
// same name, same phone, all other attributes different -> returns true | ||
Person editedAliceNewPhone = new PersonBuilder(ALICE).withEmail(VALID_EMAIL_BOB) | ||
.withAddress(VALID_ADDRESS_BOB).withStatus(VALID_STATUS_BOB).withTags(VALID_TAG_HUSBAND).build(); |
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 updating the test cases to consider the new valid inputs!
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.
LGTM
FIxes #198
Adjust person duplication detection:
-phone number and name has to be the same
-name is case-insensitive and whitespace-insensitive