File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
jupiter-tests/src/test/java/org/junit/jupiter/params/provider Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -667,11 +667,11 @@ void throwsExceptionWhenExternalFactoryMethodHasInvalidReturnType() {
667667 var exception = assertThrows (PreconditionViolationException .class ,
668668 () -> provideArguments (TestCase .class , false , factoryMethod ).toArray ());
669669
670- assertThat (exception . getMessage ()) //
671- . containsSubsequence ( " Could not find valid factory method [" + factoryMethod + " ] for test class [" ,
672- testClass + "]" , //
673- "but found the following invalid candidate: " ,
674- "static java.lang.Object " + factoryClass + ".factoryWithInvalidReturnType()" );
670+ assertThat (exception ). hasMessage ( """
671+ Could not find valid factory method [%s ] for test class [%s] \
672+ but found the following invalid candidate: \
673+ static java.lang.Object %s.factoryWithInvalidReturnType()\
674+ """ . formatted ( factoryMethod , testClass , factoryClass ) );
675675 }
676676
677677 @ Test
You can’t perform that action at this time.
0 commit comments