Skip to content

Commit f20963f

Browse files
committed
applying spotless
1 parent b898b9c commit f20963f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodArgumentsProvider.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ protected Stream<? extends Arguments> provideArguments(ExtensionContext context,
5656

5757
private Method validateStaticFactoryMethod(ExtensionContext context, Method factoryMethod) {
5858
if (isPerMethodLifecycle(context)) {
59-
Preconditions.condition(ReflectionUtils.isStatic(factoryMethod),
60-
() -> String.format("method '%s' must be static unless the test class is annotated with @TestInstance(Lifecycle.PER_CLASS).", method.toGenericString()));
59+
Preconditions.condition(ReflectionUtils.isStatic(factoryMethod), () -> String.format(
60+
"method '%s' must be static unless the test class is annotated with @TestInstance(Lifecycle.PER_CLASS).",
61+
factoryMethod.toGenericString()));
6162
}
6263
return factoryMethod;
6364
}

junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MethodArgumentsProviderTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ void throwsExceptionWhenNonStaticFactoryMethodIsReferencedAndStaticIsRequired()
199199
var exception = assertThrows(JUnitException.class,
200200
() -> provideArguments(NonStaticTestCase.class, null, false, "nonStaticStringStreamProvider").toArray());
201201

202-
assertThat(exception).hasMessageContaining("must be static unless the test class is annotated with @TestInstance(Lifecycle.PER_CLASS)");
202+
assertThat(exception).hasMessageContaining(
203+
"must be static unless the test class is annotated with @TestInstance(Lifecycle.PER_CLASS)");
203204
}
204205

205206
@Test

0 commit comments

Comments
 (0)