Add JUnit 5 checkstyle rules

Add a rule to enforce JUnit 5 usage and conventions.

Closes gh-17093
This commit is contained in:
Phillip Webb
2019-06-10 16:03:37 -07:00
parent 2560b54f7c
commit b3d5cd538d
29 changed files with 130 additions and 156 deletions

View File

@@ -71,7 +71,6 @@ class CassandraDataAutoConfigurationIntegrationTests {
AutoConfigurationPackages.register(this.context, cityPackage);
this.context.register(CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class);
this.context.refresh();
CassandraSessionFactoryBean bean = this.context.getBean(CassandraSessionFactoryBean.class);
assertThat(bean.getSchemaAction()).isEqualTo(SchemaAction.NONE);
}

View File

@@ -103,7 +103,7 @@ class ElasticsearchDataAutoConfigurationTests {
}
@Test
public void customReactiveRestTemplateShouldBeUsed() {
void customReactiveRestTemplateShouldBeUsed() {
this.contextRunner.withUserConfiguration(CustomReactiveRestTemplate.class)
.run((context) -> assertThat(context).getBeanNames(ReactiveElasticsearchTemplate.class).hasSize(1)
.contains("reactiveElasticsearchTemplate"));

View File

@@ -42,7 +42,7 @@ class RSocketMessagingAutoConfigurationTests {
.withUserConfiguration(BaseConfiguration.class);
@Test
public void shouldCreateDefaultBeans() {
void shouldCreateDefaultBeans() {
this.contextRunner.run((context) -> {
assertThat(context).getBeans(MessageHandlerAcceptor.class).hasSize(1);
assertThat(context.getBean(MessageHandlerAcceptor.class).getRouteMatcher())