Class DefaultContainerizedExternalSystem<C extends org.testcontainers.containers.GenericContainer<C>>

  • Type Parameters:
    C - Type of underlying container
    All Implemented Interfaces:
    TestResource

    @Experimental
    public class DefaultContainerizedExternalSystem<C extends org.testcontainers.containers.GenericContainer<C>>
    extends Object
    implements TestResource
    Default implementation of external system based on container.
    • Method Detail

      • startUp

        public void startUp()
                     throws Exception
        Description copied from interface: TestResource
        Start up the test resource.

        The implementation of this method should be idempotent.

        Specified by:
        startUp in interface TestResource
        Throws:
        Exception - if anything wrong when starting the resource
      • tearDown

        public void tearDown()
                      throws Exception
        Description copied from interface: TestResource
        Tear down the test resource.

        The test resource should be able to tear down even without a startup (could be a no-op).

        Specified by:
        tearDown in interface TestResource
        Throws:
        Exception - if anything wrong when tearing the resource down
      • getContainer

        public C getContainer()