ContainerFunFixture

class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[T <: Startable & Stoppable](container: T): FunFixture[T]

Creates a fun-fixture that starts a single container before each test and stops it after each test.

Creates a fun-fixture that starts a single container before each test and stops it after each test.

Example:
class MysqlSpec extends FunSuite with TestContainersFixtures {
 val mysql = ContainerFunFixture(MySQLContainer())
 mysql.test("test case name") { container =>
   // Inside your test body you can do with your container whatever you want to
   assert(container.jdbcUrl.nonEmpty)
 }
}