文章来源:http://junit.org/junit5/docs/current/user-guide/
Test classes and test methods can declare custom display names — with spaces, special characters, and even emojis — that will be displayed by test runners and test reporting.
“`
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
@DisplayName(“A special test case”)
class DisplayNameDemo {
@Test
@DisplayName("Custom test name containing spaces")
void testWithDisplayNameContainingSpaces() {
}
@Test
@DisplayName("╯°□°)╯")
void testWithDisplayNameContainingSpecialCharacters() {
}
@Test
@DisplayName("