File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/test/java/com/fasterxml/jackson/core Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -498,17 +498,22 @@ protected void assertType(Object ob, Class<?> expType)
498
498
}
499
499
}
500
500
501
- protected void verifyException (Throwable e , String ... matches )
501
+ /**
502
+ * @param e Exception to check
503
+ * @param anyMatches Array of Strings of which AT LEAST ONE ("any") has to be included
504
+ * in {@code e.getMessage()} -- using case-INSENSITIVE comparison
505
+ */
506
+ protected void verifyException (Throwable e , String ... anyMatches )
502
507
{
503
508
String msg = e .getMessage ();
504
509
String lmsg = (msg == null ) ? "" : msg .toLowerCase ();
505
- for (String match : matches ) {
510
+ for (String match : anyMatches ) {
506
511
String lmatch = match .toLowerCase ();
507
512
if (lmsg .indexOf (lmatch ) >= 0 ) {
508
513
return ;
509
514
}
510
515
}
511
- fail ("Expected an exception with one of substrings (" +Arrays .asList (matches )+"): got one with message \" " +msg +"\" " );
516
+ fail ("Expected an exception with one of substrings (" +Arrays .asList (anyMatches )+"): got one with message \" " +msg +"\" " );
512
517
}
513
518
514
519
/**
You can’t perform that action at this time.
0 commit comments