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 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

      @Autowired private DataSource 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

      @Test void dataSource_can_provide_connection() throws SQLException
      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()