* Boyscouting: Docker conventions
* Boyscouting: JUnit 5 conventions ("It is generally recommended to omit the public modifier for test classes, test methods, and lifecycle methods unless there is a technical reason for doing so)"
* Boyscouting: typo in RepositoryValidationInterceptorFactoryDstu3
* Boyscouting: use List.of instead of Guava; use StandardCharsets instead of Guava; remove unused imports
---------
Co-authored-by: Gerlach, Winfried <Winfried.Gerlach@draeger.com>
25 lines
842 B
Java
25 lines
842 B
Java
package ca.uhn.fhir.jpa.starter;
|
|
|
|
import org.junit.jupiter.api.Assertions;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = {Application.class, JpaStarterWebsocketDispatcherConfig.class}, properties = {
|
|
"hapi.fhir.custom-bean-packages=some.custom.pkg1,some.custom.pkg2",
|
|
"spring.datasource.url=jdbc:h2:mem:dbr4",
|
|
// "hapi.fhir.enable_repository_validating_interceptor=true",
|
|
"hapi.fhir.fhir_version=r4"
|
|
})
|
|
class CustomBeanTest {
|
|
|
|
@Autowired
|
|
some.custom.pkg1.CustomBean customBean1;
|
|
|
|
@Test
|
|
void testCustomBeanExists() {
|
|
Assertions.assertNotNull(customBean1);
|
|
Assertions.assertEquals("I am alive", customBean1.getInitFlag());
|
|
}
|
|
}
|