Skip to content

Commit 7b371c1

Browse files
rursprungmeetvm
authored and
meetvm
committed
improve PhoneNumberAnalyzerTests#testTelPrefixSearch (opensearch-project#17016)
this way we ensure that it doesn't include any additional tokens which we don't want. this is a follow-up to commit 4d94399 / opensearch-project#16993. Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
1 parent 552484a commit 7b371c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/analysis-phonenumber/src/test/java/org/opensearch/analysis/phone/PhoneNumberAnalyzerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ public void testSipWithoutDomainPart() throws IOException {
159159
}
160160

161161
public void testTelPrefix() throws IOException {
162-
assertTokensInclude("tel:+1228", Arrays.asList("1228", "122", "228"));
162+
assertTokensInclude(phoneAnalyzer, "tel:+1228", Arrays.asList("tel:+1228", "tel:", "1228", "122", "228"));
163163
}
164164

165165
public void testTelPrefixSearch() throws IOException {
166-
assertTokensInclude("tel:+1228", Arrays.asList("1228"));
166+
assertTokensAreInAnyOrder(phoneSearchAnalyzer, "tel:+1228", Arrays.asList("tel:+1228", "1228"));
167167
}
168168

169169
public void testNumberPrefix() throws IOException {

0 commit comments

Comments
 (0)