diff --git a/src/main/java/seedu/address/model/person/Phone.java b/src/main/java/seedu/address/model/person/Phone.java index e9b60b7594b..fe4687b0b56 100644 --- a/src/main/java/seedu/address/model/person/Phone.java +++ b/src/main/java/seedu/address/model/person/Phone.java @@ -10,8 +10,8 @@ public class Phone { public static final String MESSAGE_CONSTRAINTS = - "Phone numbers should only contain numbers (or start with + sign for international numbers), " + - "and it should be between 3 - 20 digits long"; + "Phone numbers should only contain numbers (or start with + sign for international numbers), " + + "and it should be between 3 - 20 digits long"; public static final String VALIDATION_REGEX = "\\d{3,}"; public final String value; diff --git a/src/test/java/seedu/address/model/person/PersonTest.java b/src/test/java/seedu/address/model/person/PersonTest.java index 9ce43efc670..bb05486ea31 100644 --- a/src/test/java/seedu/address/model/person/PersonTest.java +++ b/src/test/java/seedu/address/model/person/PersonTest.java @@ -35,6 +35,12 @@ public void isSamePerson() { editedAlice = new PersonBuilder(ALICE).withName(VALID_NAME_BOB).build(); assertFalse(ALICE.isSamePerson(editedAlice)); + editedAlice = new PersonBuilder(ALICE).withDob("1000-01-01").build(); + assertFalse(ALICE.isSamePerson(editedAlice)); + + editedAlice = new PersonBuilder(ALICE).withPhone("911").withEmail("ecila@gmail.com").build(); + assertFalse(ALICE.isSamePerson(editedAlice)); + // name differs in case, all other attributes same -> returns false Person editedBob = new PersonBuilder(BOB).withName(VALID_NAME_BOB.toLowerCase()).build(); assertFalse(BOB.isSamePerson(editedBob));