Env

case
class Env(arguments: Arguments, resources: Resources, systemLogger: Logger, printerLogger: PrinterLogger, statisticsRepository: StatisticsRepository, random: Random, fileSystem: FileSystem, customClassLoader: Option[ClassLoader], classLoading: ClassLoading, executionEnv: ExecutionEnv, specs2ExecutionEnv: ExecutionEnv)

Whole creation / execution / reporting environment for a specification

Part of it is driven by the command-line, part of it is specs2 implementation Yet it can be used to drive the creation or execution of examples

Note: creating an Env instance is a delicate activity because the Env hold a thread pool that needs to be shutdown at the end of the execution

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def awaitShutdown(): Unit

be sure to only call this method on the JVM!

be sure to only call this method on the JVM!

def setArguments(args: Arguments): Env

set new arguments

set new arguments

if a custom classloader is used, give the possibility to set it as the context class loader This is used during the execution of fragments. See Execution.scala

if a custom classloader is used, give the possibility to set it as the context class loader This is used during the execution of fragments. See Execution.scala

def setCustomClassLoader(classLoader: ClassLoader): Env

set a new classloader to be used as the context classloader for each execution

set a new classloader to be used as the context classloader for each execution

set new PrinterLogger

set new PrinterLogger

set a new statistic repository

set a new statistic repository

def setSystemLogger(logger: Logger): Env

set new system logger

set new system logger

def setTimeout(duration: FiniteDuration): Env
def shutdown: Future[List[Result]]
Returns

a list of finalization failures by resource key if any

def shutdownResult: Future[Result]

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Concrete fields

lazy
val commandLine: CommandLine
lazy
val defaultInstances: List[AnyRef]
lazy
val executionContext: ExecutionContext
lazy
val executorServices: ExecutorServices
lazy
val specs2ExecutionContext: ExecutionContext
lazy
val specs2ExecutorServices: ExecutorServices
lazy
val timeout: Option[FiniteDuration]