Add nullability annotations to tests in module/spring-boot-data-r2dbc

See gh-47263
This commit is contained in:
Moritz Halbritter
2025-10-06 12:03:53 +02:00
parent a111f1f68f
commit 3fdc1db7ce
2 changed files with 7 additions and 0 deletions
@@ -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);
});
}