Top Description Methods
org.junit.jupiter.api

public @Interface DisplayNameGeneration

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
@Documented
@Inherited
@API
status:STABLE
since:5.7
Static Imports
org.apiguardian.api.API.Status.STABLE

@DisplayNameGeneration is used to declare a custom display name generator for the annotated test class.

This annotation is inherited from superclasses and implemented interfaces. It is also inherited from enclosing classes for @Nested test classes.

As an alternative to @DisplayNameGeneration, a global DisplayNameGenerator can be configured for the entire test suite via the junit.jupiter.displayname.generator.default configuration parameter. See the User Guide for details. Note, however, that a @DisplayNameGeneration declaration always overrides a global DisplayNameGenerator.

Since
5.4
See Also
DisplayName, DisplayNameGenerator, IndicativeSentencesGeneration

Method Summary

Modifier and TypeMethod and Description
public Class<? extends DisplayNameGenerator>

Returns:

custom display name generator class
value
()

Custom display name generator.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public Class<? extends DisplayNameGenerator> value()

Custom display name generator.

Returns:Class<? extends DisplayNameGenerator>

custom display name generator class