Add nullability annotations to tests in module/spring-boot-data-r2dbc
See gh-47263
This commit is contained in:
parent
a111f1f68f
commit
3fdc1db7ce
|
@ -40,5 +40,11 @@ dependencies {
|
|||
testImplementation("io.projectreactor:reactor-test")
|
||||
testImplementation("io.r2dbc:r2dbc-h2")
|
||||
|
||||
testCompileOnly("com.google.code.findbugs:jsr305")
|
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ class DataR2dbcAutoConfigurationTests {
|
|||
this.contextRunner.withUserConfiguration(TestConfiguration.class).run((context) -> {
|
||||
R2dbcMappingContext mappingContext = context.getBean(R2dbcMappingContext.class);
|
||||
ManagedTypes managedTypes = (ManagedTypes) ReflectionTestUtils.getField(mappingContext, "managedTypes");
|
||||
assertThat(managedTypes).isNotNull();
|
||||
assertThat(managedTypes.toList()).containsOnly(City.class);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue