NonSuspendingGeneratingFixtureScope

Scope for managing mutable test fixtures that are regenerated for each test. Provides a structured way to define tests that require fresh fixture instances generated before each test.

Parameters

T

The type of fixture object being managed

Properties

Link copied to clipboard
val generator: () -> T

Function that generates new fixture instances

Link copied to clipboard
val testSuite: TestSuiteScope

The parent test suite containing this mutable fixture scope

Link copied to clipboard
open override val testSuiteInScope: TestSuite

Functions

Link copied to clipboard
fun test(name: String, maxLength: Int = TestBalloonAddons.defaultTestNameMaxLength, testConfig: TestConfig = TestConfig, content: suspend Test.ExecutionScope.(T) -> Unit)

Registers a test that uses a fresh fixture instance as a child of the current testSuite.

open fun TestSuiteScope.test(name: String, testConfig: TestConfig, action: suspend Test.ExecutionScope.() -> Unit)
Link copied to clipboard
open fun <Value : Any> testFixture(value: suspend TestSuite.() -> Value): TestFixture<Value>
Link copied to clipboard
fun testSuite(name: String, maxLength: Int = TestBalloonAddons.defaultTestNameMaxLength, testConfig: TestConfig = TestConfig, content: NonSuspendingGeneratingFixtureScope<T>.(T) -> Unit)

Registers a test suite that uses a fresh fixture instance as a child of the current testSuite.

open fun TestSuiteScope.testSuite(name: String, testConfig: TestConfig, content: TestSuite.() -> Unit)
Link copied to clipboard
fun <T> TestSuiteScope.withFixtureGenerator(generator: () -> T): GeneratingFixtureScopHolder<T>
fun <T> TestSuiteScope.withFixtureGenerator(generator: suspend () -> T): GeneratingSuspendFixtureScopHolder<T>

Prepares a fixture-generating scope from a generator function.