Skip to content

Compatibility with Arrowopensavvy.prepared.compat.arrow.coroutinesinstall

install

suspend fun <A> TestDsl.install(acquire: suspend TestDsl.() -> A, release: suspend TestDsl.(A, ExitCase) -> Unit): A

Installs an acquire action and its matching release action.

This is a convenience equivalent of ResourceScope.install directly on the test. The behavior is identical to calling ResourceScope.install on the test's resourceScope.

External resources

Parameters

acquire

The acquire action, executed immediately.

release

The release action, executed at the end of the test.

See also

suspend fun <A> TestDsl.install(resource: Resource<A>): A

Installs a Resource into the test's lifecycle scope.

The resource is immediately installed. It is released at the end of the test.

This method has identical behavior to ResourceScope.bind on the test's resourceScope. It cannot be called .bind() because this would require two receivers, and context parameters are not yet stable.

External resources

See also