@@ -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 /**
0 commit comments