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.ReplaceUnderscores
- Enclosing interface:
- DisplayNameGenerator
public static class DisplayNameGenerator.Standard extends Object implements DisplayNameGenerator
Standard display name generator.The implementation matches the published behaviour when Jupiter 5.0.0 was released.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.jupiter.api.DisplayNameGenerator
DisplayNameGenerator.ReplaceUnderscores, DisplayNameGenerator.Standard
-
-
Constructor Summary
Constructors Constructor Description Standard()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateDisplayNameForClass(Class<?> testClass)Generate a display name for the given top-level orstaticnested test class.StringgenerateDisplayNameForMethod(Class<?> testClass, Method testMethod)Generate a display name for the given method.StringgenerateDisplayNameForNestedClass(Class<?> nestedClass)Generate a display name for the given@Nestedinner test class.
-
-
-
Method Detail
-
generateDisplayNameForClass
public String generateDisplayNameForClass(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 generate a name for; nevernull- Returns:
- the display name of the container; never
nullor blank
-
generateDisplayNameForNestedClass
public String generateDisplayNameForNestedClass(Class<?> nestedClass)
Description copied from interface:DisplayNameGeneratorGenerate a display name for the given@Nestedinner test class.- Specified by:
generateDisplayNameForNestedClassin interfaceDisplayNameGenerator- Parameters:
nestedClass- the class generate a name for; nevernull- Returns:
- the display name of the container; never
nullor blank
-
generateDisplayNameForMethod
public String generateDisplayNameForMethod(Class<?> testClass, 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 of the test; never
nullor blank
-
-