Class HelloApiContainerIT
java.lang.Object
info.ejava.examples.svc.tcontainers.hello.HelloApiContainerIT
@SpringBootTest(classes=ClientNTestConfiguration.class,
webEnvironment=NONE)
@ActiveProfiles("test")
@EnableAutoConfiguration
class HelloApiContainerIT
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.springframework.web.client.RestTemplateprivate DataSourceprivate org.springframework.web.util.UriBuilderprivate com.mongodb.client.MongoClientprivate static final org.testcontainers.containers.ComposeContainer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddLateSpringContextProperties(org.springframework.test.context.DynamicPropertyRegistry registry) (package private) void(package private) void(package private) void(package private) void(package private) void
-
Field Details
-
network
private static final org.testcontainers.containers.ComposeContainer network -
anonymousUser
@Autowired private org.springframework.web.client.RestTemplate anonymousUser -
dbUrl
private org.springframework.web.util.UriBuilder dbUrl -
dataSource
-
mongoClient
@Autowired private com.mongodb.client.MongoClient mongoClient
-
-
Constructor Details
-
HelloApiContainerIT
HelloApiContainerIT()
-
-
Method Details
-
addLateSpringContextProperties
@DynamicPropertySource private static void addLateSpringContextProperties(org.springframework.test.context.DynamicPropertyRegistry registry) -
init
@BeforeEach void init(@Value("${it.server.host:localhost}") String remoteApiContainerHost, @Value("${it.server.port:9090}") int remoteApiContainerPort) -
dataSource_can_provide_connection
- Throws:
SQLException
-
server_can_get_jdbc_connection
@Test void server_can_get_jdbc_connection() -
mongoClient_can_get_connection
@Test void mongoClient_can_get_connection() -
server_can_get_mongo_connection
@Test void server_can_get_mongo_connection()
-