@Test public void applyShouldNotFindWhenNoMatch() { AddressBookEntry entry = new AddressBookEntry("Test", Gender.MALE, DUMMY_DATE); assertFalse("Expects false for no match", predicate.apply(entry)); }
@Test public void applyShouldReturnTrueforSubstringMatch() { AddressBookEntry entry = new AddressBookEntry("alfred", Gender.FEMALE, DUMMY_DATE); assertTrue("Expects true for substring", predicate.apply(entry)); }
@Test public void applyShouldReturnTrueforDifferentCase() { AddressBookEntry entry = new AddressBookEntry("Frederick", Gender.FEMALE, DUMMY_DATE); assertTrue("Expects true for different case", predicate.apply(entry)); }
@Test public void applyShouldReturnTrueforExactMatch() { AddressBookEntry entry = new AddressBookEntry("fred", Gender.FEMALE, DUMMY_DATE); assertTrue("Expects true for exect match", predicate.apply(entry)); }