2
4

1 回答 1

2

JUnit 5 method template can be configured in Settings (Preferences on Mac) | Editor | File and Code Templates | Code tab, JUnit 5 Test Method:

method template

Change this:

@org.junit.jupiter.api.Test
void ${NAME}() {
  ${BODY}
}

…to this:

@org.junit.jupiter.api.Test
@org.junit.jupiter.api.DisplayName ( "NameGoesHere" )
void ${NAME}() {
  ${BODY}
}
于 2019-02-21T22:22:26.060 回答