public static class DisplayNameGenerator.Simple extends DisplayNameGenerator.Standard
DisplayNameGenerator that removes trailing parentheses
for methods with no parameters.
This generator extends the functionality of DisplayNameGenerator.Standard by
removing parentheses ('()') found at the end of method names
with no parameters.
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 |
|---|
Simple() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateDisplayNameForMethod(java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod)
Generate a display name for the given method.
|
private static boolean |
hasParameters(java.lang.reflect.Method method) |
generateDisplayNameForClass, generateDisplayNameForNestedClassclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayNameGenerator, parameterTypesAsStringstatic final DisplayNameGenerator INSTANCE
public 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 DisplayNameGeneratorgenerateDisplayNameForMethod in class DisplayNameGenerator.StandardtestClass - the class the test method is invoked on; never nulltestMethod - method to generate a display name for; never nullprivate static boolean hasParameters(java.lang.reflect.Method method)