diff --git a/src/test/java/seedu/address/model/person/NameAndTagContainsKeywordsPredicateTest.java b/src/test/java/seedu/address/model/person/NameAndTagContainsKeywordsPredicateTest.java index 52b6b188422..af6caa2ab66 100644 --- a/src/test/java/seedu/address/model/person/NameAndTagContainsKeywordsPredicateTest.java +++ b/src/test/java/seedu/address/model/person/NameAndTagContainsKeywordsPredicateTest.java @@ -42,6 +42,22 @@ public void equals() { // different person -> returns false assertFalse(firstPredicate.equals(secondPredicate)); + + NameAndTagContainsKeywordsPredicate thirdPredicate = + new NameAndTagContainsKeywordsPredicate(Collections.emptyList(), Arrays.asList("firstTag")); + NameAndTagContainsKeywordsPredicate fourthPredicate = + new NameAndTagContainsKeywordsPredicate(Collections.emptyList(), Arrays.asList("secondTag")); + + // Different tagKeywords should not be equal + assertFalse(thirdPredicate.equals(fourthPredicate)); + + NameAndTagContainsKeywordsPredicate fifthPredicate = + new NameAndTagContainsKeywordsPredicate(Arrays.asList("Jamus"), Collections.emptyList()); + NameAndTagContainsKeywordsPredicate sixthPredicate = + new NameAndTagContainsKeywordsPredicate(Arrays.asList("Jamuses"), Collections.emptyList()); + + // Different tagKeywords should not be equal + assertFalse(fifthPredicate.equals(sixthPredicate)); } @Test