strikt-core / strikt.api / ExpectationBuilder / catching

catching

abstract fun <T> catching(action: suspend () -> T): DescribeableBuilder<Result<T>>

Start a chain of assertions over the result of action.

Parameters

action - an action that may result in a value being returned or an exception being thrown.

Return
an assertion for the result of action.