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

java.lang.Object
software.xdev.tci.TCI<C>

public class TCI<C extends org.testcontainers.containers.GenericContainer<C>> extends Object
Represents basic Testcontainers based infrastructure.

It can be extended and contain other things like e.g. clients, that may also require initialization during startup.

This was created so that you don't have to extend containers and add non-container related stuff like e.g. clients to them. ("You should favor composition over inheritance")

  • Constructor Details

    • TCI

      protected TCI(C container, String networkAlias)
  • Method Details

    • setOnStopped

      public void setOnStopped(Runnable onStopped)
    • setNetworkAlias

      public void setNetworkAlias(String networkAlias)
    • start

      public void start(String containerName)
    • stop

      public void stop()
    • onStopped

      protected void onStopped()
    • getContainer

      public C getContainer()
    • getNetworkAlias

      public String getNetworkAlias()