opensavvy.prepared.suite¶
Types¶
Prepared¶
Lazily-generated value unique to a test case.
PreparedDelegate¶
class PreparedDelegate<T>
See prepared.
PreparedDsl¶
interface PreparedDsl
PreparedDslMarker¶
@DslMarker
@Target
(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION])annotation class PreparedDslMarker
PreparedProvider¶
class PreparedProvider<T>
A Prepared is a lazily-created value that is bound to a test, such that multiple reads provide the same value.
Shared¶
Pure, immutable lazy value which is shared between all tests.
SharedDelegate¶
class SharedDelegate<T>
See shared.
SharedProvider¶
class SharedProvider<T>
A Shared is a lazily-created value that is reused between tests.
SuiteDsl¶
interface SuiteDsl : PreparedDsl
A group of tests.
TestDsl¶
interface TestDsl : PreparedDsl
A test declaration.
TestEnvironment¶
class TestEnvironment
Common utilities and features required for testing.
Time¶
class Time
Time control helper. See time.
Properties¶
Functions¶
prepared¶
fun <T> prepared(
context: CoroutineContext = EmptyCoroutineContext,
display: Display = Display.Short,
block: suspend TestDsl.() -> T
): PreparedProvider<T>
Declares a lazily-prepared value which will be constructed by calling block during test execution.
Declares a lazily-prepared value called name which will be constructed by calling block during test execution.
runTestDsl¶
fun runTestDsl(
name: String,
config: TestConfig,
block: suspend TestDsl.() -> Unit
): TestResult
Low-level primitive to execute a test declared as a TestDsl.
runTestDslSuspend¶
suspend fun TestScope.runTestDslSuspend(
name: String,
config: TestConfig,
block: suspend TestDsl.() -> Unit
)
shared¶
fun <T> shared(
context: CoroutineContext = EmptyCoroutineContext,
display: Display = Display.Short,
block: suspend () -> T
): SharedProvider<T>
Declares a lazily-computed value that is constructed by calling block, and is then shared between all tests.