forked from AY2425S1-CS2103T-F15-4/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
53 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,13 +49,13 @@ public void test_addressContainsKeywords_returnsTrue() { | |
new AddressContainsKeywordsPredicate(Arrays.asList("74 University Town, #04-02")); | ||
assertTrue(predicate.test(new PersonBuilder().withAddress("74 University Town, #04-02").build())); | ||
|
||
// One full-matching keyword | ||
predicate = new AddressContainsKeywordsPredicate(Arrays.asList("73 Jurong Island, #02-04")); | ||
assertTrue(predicate.test(new PersonBuilder().withAddress("73 Jurong Island, #02-04").build())); | ||
|
||
// One partial-matching keyword | ||
predicate = new AddressContainsKeywordsPredicate(Arrays.asList("University Town")); | ||
assertTrue(predicate.test(new PersonBuilder().withAddress("74 University Town, #04-02").build())); | ||
|
||
// One partial-matching keyword, case-insensitive | ||
predicate = new AddressContainsKeywordsPredicate(Arrays.asList("uNiversiTy Tow")); | ||
assertTrue(predicate.test(new PersonBuilder().withAddress("74 University Town, #04-02").build())); | ||
} | ||
|
||
@Test | ||
|
@@ -66,7 +66,7 @@ public void test_addressDoesNotContainKeywords_returnsFalse() { | |
|
||
// Keywords match name, email and phone, but does not match address | ||
predicate = new AddressContainsKeywordsPredicate(Arrays.asList("Alice", "12345", | ||
"[email protected]", "West", "Street")); | ||
"[email protected]", "West", "Avenue")); | ||
assertFalse(predicate.test(new PersonBuilder().withName("Alice").withPhone("12345") | ||
.withEmail("[email protected]").withAddress("Main Street").build())); | ||
} | ||
|