Skip to content

Commit

Permalink
Merge pull request #126 from LimJH2002/branch-ui
Browse files Browse the repository at this point in the history
Branch UI
  • Loading branch information
LimJH2002 authored Nov 2, 2023
2 parents d76178c + c488451 commit 0810002
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/test/java/seedu/cc/model/person/PersonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static seedu.cc.logic.commands.CommandTestUtil.VALID_AGE_BOB;
import static seedu.cc.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;
Expand Down Expand Up @@ -58,39 +59,39 @@ public void isSamePerson() {
public void equals() {
// same values -> returns true
Person aliceCopy = new PatientBuilder(ALICE).build();
assertTrue(ALICE.equals(aliceCopy));
assertEquals(ALICE, aliceCopy);

// same object -> returns true
assertTrue(ALICE.equals(ALICE));
assertEquals(ALICE, ALICE);

// null -> returns false
assertFalse(ALICE.equals(null));
assertNotEquals(null, ALICE);

// different type -> returns false
assertFalse(ALICE.equals(5));
assertNotEquals(5, ALICE);

// different person -> returns false
assertFalse(ALICE.equals(BOB));
assertNotEquals(ALICE, BOB);

// different name -> returns false
Person editedAlice = new PatientBuilder(ALICE).withName(VALID_NAME_BOB).build();
assertFalse(ALICE.equals(editedAlice));
assertNotEquals(ALICE, editedAlice);

// different phone -> returns false
editedAlice = new PatientBuilder(ALICE).withPhone(VALID_PHONE_BOB).build();
assertFalse(ALICE.equals(editedAlice));
assertNotEquals(ALICE, editedAlice);

// different email -> returns false
editedAlice = new PatientBuilder(ALICE).withEmail(VALID_EMAIL_BOB).build();
assertFalse(ALICE.equals(editedAlice));
assertNotEquals(ALICE, editedAlice);

// different age -> returns false
editedAlice = new PatientBuilder(ALICE).withAge(VALID_AGE_BOB).build();
assertFalse(ALICE.equals(editedAlice));
assertNotEquals(ALICE, editedAlice);

// different tags -> returns false
editedAlice = new PatientBuilder(ALICE).withTags(VALID_TAG_HUSBAND).build();
assertFalse(ALICE.equals(editedAlice));
assertNotEquals(ALICE, editedAlice);
}

@Test
Expand Down

0 comments on commit 0810002

Please sign in to comment.