Skip to content

Commit 249f204

Browse files
committed
Fix extra spotlessApply violation
1 parent 778e0bd commit 249f204

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGenerator.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ public interface DisplayNameGenerator {
9191
* @return the display name for the nested class; never blank
9292
*/
9393
default String generateDisplayNameForNestedClass(Class<?> nestedClass) {
94-
throw new UnsupportedOperationException("Implement generateDisplayNameForNestedClass(List<Class<?>>, Class<?>) instead");
94+
throw new UnsupportedOperationException(
95+
"Implement generateDisplayNameForNestedClass(List<Class<?>>, Class<?>) instead");
9596
}
9697

9798
/**
@@ -121,7 +122,8 @@ default String generateDisplayNameForNestedClass(List<Class<?>> enclosingInstanc
121122
* @return the display name for the test; never blank
122123
*/
123124
default String generateDisplayNameForMethod(Class<?> testClass, Method testMethod) {
124-
throw new UnsupportedOperationException("Implement generateDisplayNameForMethod(List<Class<?>>, Class<?>, Method) instead");
125+
throw new UnsupportedOperationException(
126+
"Implement generateDisplayNameForMethod(List<Class<?>>, Class<?>, Method) instead");
125127
}
126128

127129
/**
@@ -285,9 +287,11 @@ public String generateDisplayNameForNestedClass(List<Class<?>> enclosingInstance
285287
}
286288

287289
@Override
288-
public String generateDisplayNameForMethod(List<Class<?>> enclosingInstanceTypes, Class<?> testClass, Method testMethod) {
290+
public String generateDisplayNameForMethod(List<Class<?>> enclosingInstanceTypes, Class<?> testClass,
291+
Method testMethod) {
289292
return getSentenceBeginning(enclosingInstanceTypes, testClass) + getFragmentSeparator(testClass)
290-
+ getGeneratorFor(testClass).generateDisplayNameForMethod(enclosingInstanceTypes, testClass, testMethod);
293+
+ getGeneratorFor(testClass).generateDisplayNameForMethod(enclosingInstanceTypes, testClass,
294+
testMethod);
291295
}
292296

293297
private String getSentenceBeginning(List<Class<?>> enclosingInstanceTypes, Class<?> testClass) {
@@ -319,10 +323,13 @@ private String getSentenceBeginning(List<Class<?>> enclosingInstanceTypes, Class
319323
.filter(IndicativeSentences.class::equals)//
320324
.isPresent();
321325

322-
String prefix = (buildPrefix ? getSentenceBeginning(enclosingInstanceTypes, enclosingInstanceType) + getFragmentSeparator(testClass) : "");
326+
String prefix = (buildPrefix
327+
? getSentenceBeginning(enclosingInstanceTypes, enclosingInstanceType)
328+
+ getFragmentSeparator(testClass)
329+
: "");
323330

324331
return prefix + displayName.orElseGet(
325-
() -> getGeneratorFor(testClass).generateDisplayNameForNestedClass(testClass));
332+
() -> getGeneratorFor(testClass).generateDisplayNameForNestedClass(testClass));
326333
}
327334

328335
/**

jupiter-tests/src/test/java/org/junit/jupiter/api/AbstractBaseTests.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
* Copyright 2015-2024 the original author or authors.
3+
*
4+
* All rights reserved. This program and the accompanying materials are
5+
* made available under the terms of the Eclipse Public License v2.0 which
6+
* accompanies this distribution and is available at
7+
*
8+
* https://www.eclipse.org/legal/epl-v20.html
9+
*/
10+
111
package org.junit.jupiter.api;
212

313
@IndicativeSentencesGeneration

jupiter-tests/src/test/java/org/junit/jupiter/api/ScenarioOneTests.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
* Copyright 2015-2024 the original author or authors.
3+
*
4+
* All rights reserved. This program and the accompanying materials are
5+
* made available under the terms of the Eclipse Public License v2.0 which
6+
* accompanies this distribution and is available at
7+
*
8+
* https://www.eclipse.org/legal/epl-v20.html
9+
*/
10+
111
package org.junit.jupiter.api;
212

313
public class ScenarioOneTests extends AbstractBaseTests {

jupiter-tests/src/test/java/org/junit/jupiter/api/ScenarioTwoTests.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
* Copyright 2015-2024 the original author or authors.
3+
*
4+
* All rights reserved. This program and the accompanying materials are
5+
* made available under the terms of the Eclipse Public License v2.0 which
6+
* accompanies this distribution and is available at
7+
*
8+
* https://www.eclipse.org/legal/epl-v20.html
9+
*/
10+
111
package org.junit.jupiter.api;
212

313
public class ScenarioTwoTests extends AbstractBaseTests {

0 commit comments

Comments
 (0)