LazyContainer

class LazyContainer[T <: Container](factory: => T) extends Container with TestLifecycleAware

Lazy container wrapper aims to solve the problem of cross-container dependencies in MultipleContainers when a second container requires some after start data from a first one (e.g. an application container needs JDBC url of a container with a database - in that case the url becomes available after the database container has started)

You don't need to wrap your containers into the LazyContainer manually when you pass your containers in the MultipleContainers- there is implicit conversion for that.

Companion:
object
trait Container
trait Stoppable
trait Andable
trait Startable
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Concrete methods

override def afterTest(description: TestDescription, throwable: Option[Throwable]): Unit
Definition Classes
override def beforeTest(description: TestDescription): Unit
Definition Classes
override def start(): Unit
Definition Classes
Startable
override def stop(): Unit
Definition Classes
Stoppable -> Andable -> Startable

Deprecated methods

@deprecated("Use `stop` and/or `TestLifecycleAware.afterTest` instead")
override def failed(e: Throwable)(implicit description: Description): Unit
Deprecated
Definition Classes
@deprecated("Use `stop` instead")
override def finished()(implicit description: Description): Unit
Deprecated
Definition Classes
@deprecated("Use `start` instead")
override def starting()(implicit description: Description): Unit
Deprecated
Definition Classes
@deprecated("Use `stop` and/or `TestLifecycleAware.afterTest` instead")
override def succeeded()(implicit description: Description): Unit
Deprecated
Definition Classes

Inherited methods

override def close(): Unit
Definition Classes
Stoppable -> AutoCloseable
Inherited from:
Stoppable
def foreach(f: Stoppable => Unit): Unit
Inherited from:
Andable
def getDependencies(): Set[Startable]
Inherited from:
Startable

Concrete fields

lazy val container: T