public static class DisplayNameGenerator.Standard extends java.lang.Object implements DisplayNameGenerator
DisplayNameGenerator.
This implementation matches the standard display name generation behavior in place since JUnit Jupiter 5.0 was released.
DisplayNameGenerator.IndicativeSentences, DisplayNameGenerator.ReplaceUnderscores, DisplayNameGenerator.Simple, DisplayNameGenerator.Standard| Modifier and Type | Field and Description |
|---|---|
(package private) static DisplayNameGenerator |
INSTANCE |
DEFAULT_GENERATOR_PROPERTY_NAME| Constructor and Description |
|---|
Standard() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateDisplayNameForClass(java.lang.Class<?> testClass)
Generate a display name for the given top-level or
static nested test class. |
java.lang.String |
generateDisplayNameForMethod(java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod)
Generate a display name for the given method.
|
java.lang.String |
generateDisplayNameForNestedClass(java.lang.Class<?> nestedClass)
Generate a display name for the given
@Nested inner test class. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayNameGenerator, parameterTypesAsStringstatic final DisplayNameGenerator INSTANCE
public java.lang.String generateDisplayNameForClass(java.lang.Class<?> testClass)
DisplayNameGeneratorstatic nested test class.
If it returns null, the default display name generator will be used instead.
generateDisplayNameForClass in interface DisplayNameGeneratortestClass - the class to generate a name for; never nullpublic java.lang.String generateDisplayNameForNestedClass(java.lang.Class<?> nestedClass)
DisplayNameGenerator@Nested inner test class.
If it returns null, the default display name generator will be used instead.
generateDisplayNameForNestedClass in interface DisplayNameGeneratornestedClass - the class to generate a name for; never nullpublic java.lang.String generateDisplayNameForMethod(java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod)
DisplayNameGeneratorIf it returns null, the default display name generator will be used instead.
generateDisplayNameForMethod in interface DisplayNameGeneratortestClass - the class the test method is invoked on; never nulltestMethod - method to generate a display name for; never null