asParameterForAll
infix fun asParameterForAll(content: TestFixture.Scope<suspend Test.ExecutionScope.(value: Value) -> Unit>.() -> Unit): TestFixture<Value>(source)
Provides the value from this fixture as a parameter for all tests declared in the content's scope.
The fixture is implied to be a suite-level fixture. Its value will be instantiated on first use, then shared across tests. It has a lifetime of the suite it was registered in.
Usage:
testFixture {
MyRepository(this)
} asParameterForAll {
test("verify score") { repository ->
repository.getScore(...)
}
}Content copied to clipboard