kotest-core / io.kotest.core.spec.style / FunSpecTestFactoryConfiguration

FunSpecTestFactoryConfiguration

class FunSpecTestFactoryConfiguration : TestFactoryConfiguration, FunSpecDsl

Constructors

<init>

FunSpecTestFactoryConfiguration()

Properties

addListener

val addListener: KFunction1<TestListener, Unit>

addTest

val addTest: KFunction4<String, suspend TestContext.() -> Unit, TestCaseConfig, TestType, Unit>

Functions

defaultConfig

fun defaultConfig(): TestCaseConfig

Extension Functions

autoClose

Closes an AutoCloseable when the spec is completed by registering an afterSpec listener which invokes the AutoCloseable.close method.

fun <T : AutoCloseable> TestConfiguration.autoClose(closeable: T): T

Closes a lazy AutoCloseable when the spec is completed by registering an afterSpec listener which invokes the AutoCloseable.close method.

fun <T : AutoCloseable> TestConfiguration.autoClose(closeable: Lazy<T>): Lazy<T>

build

Builds an immutable TestFactory from this configuration.

fun TestFactoryConfiguration.build(): TestFactory

tempfile

fun TestConfiguration.tempfile(prefix: String? = null, suffix: String? = ".tmp"): File