Package org.junit.jupiter.api
Class DisplayNameGenerator.Standard
java.lang.Object
org.junit.jupiter.api.DisplayNameGenerator.Standard
- All Implemented Interfaces:
DisplayNameGenerator
- Direct Known Subclasses:
DisplayNameGenerator.Simple
- Enclosing interface:
- DisplayNameGenerator
public static class DisplayNameGenerator.Standard extends java.lang.Object implements DisplayNameGenerator
Standard
DisplayNameGenerator.
This implementation matches the standard display name generation behavior in place since JUnit Jupiter 5.0 was released.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.jupiter.api.DisplayNameGenerator
DisplayNameGenerator.IndicativeSentences, DisplayNameGenerator.ReplaceUnderscores, DisplayNameGenerator.Simple, DisplayNameGenerator.Standard -
Constructor Summary
Constructors Constructor Description Standard() -
Method Summary
Modifier and Type Method Description java.lang.StringgenerateDisplayNameForClass(java.lang.Class<?> testClass)Generate a display name for the given top-level orstaticnested test class.java.lang.StringgenerateDisplayNameForMethod(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)Generate a display name for the given method.java.lang.StringgenerateDisplayNameForNestedClass(java.lang.Class<?> nestedClass)Generate a display name for the given@Nestedinner test class.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Standard
public Standard()
-
-
Method Details
-
generateDisplayNameForClass
public java.lang.String generateDisplayNameForClass(java.lang.Class<?> testClass)Description copied from interface:DisplayNameGeneratorGenerate a display name for the given top-level orstaticnested test class.- Specified by:
generateDisplayNameForClassin interfaceDisplayNameGenerator- Parameters:
testClass- the class to generate a name for; nevernull- Returns:
- the display name for the class; never
nullor blank
-
generateDisplayNameForNestedClass
public java.lang.String generateDisplayNameForNestedClass(java.lang.Class<?> nestedClass)Description copied from interface:DisplayNameGeneratorGenerate a display name for the given@Nestedinner test class.- Specified by:
generateDisplayNameForNestedClassin interfaceDisplayNameGenerator- Parameters:
nestedClass- the class to generate a name for; nevernull- Returns:
- the display name for the nested class; never
nullor blank
-
generateDisplayNameForMethod
public java.lang.String generateDisplayNameForMethod(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)Description copied from interface:DisplayNameGeneratorGenerate a display name for the given method.- Specified by:
generateDisplayNameForMethodin interfaceDisplayNameGenerator- Parameters:
testClass- the class the test method is invoked on; nevernulltestMethod- method to generate a display name for; nevernull- Returns:
- the display name for the test; never
nullor blank
-