-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Status Quo
It is currently possible to declare @DisplayName("") (or containing only white space), but this should not be permitted.
If a user explicitly declares @DisplayName, the user must provide a non-empty name.
The same applies to display name patterns supplied via @RepeatedTest and @ParameterizedTest.
Related Issues
Deliverables
- Introduce appropriate JavaDoc for
DisplayName.value. - ❌ Introduce precondition check to ensure that a user has supplied a non-empty name via
@DisplayName.- See TODO in
TestInfoParameterResolverTests.customDisplayNameThatIsEmpty() - Instead of using precondition checks, we can currently only log a warning. See commit f03cc6d for details.
- See TODO in
- Ensure that the precondition check is applied to
@Test,@TestFactory, and@TestTemplatemethods (for repeated and parameterized tests as well). - Ensure that all extensions or internal mechanisms that generate or return a display name return non-empty values.