Package-level declarations
Contains an API for types introduced with Kotlin 1.3 (e.g. for Result
).
Functions
Link copied to clipboard
Expects that the subject of this
expectation (a Result) is a success (Result.isSuccess) and returns an Expect for the inner type E.
Expects that the subject of this
expectation (a Result) is a success (Result.isSuccess) and that it holds all assertions the given SuccessWithCreator.assertionCreator creates.
Link copied to clipboard
Expects that the subject of this
expectation (a Result) is a failure (Result.isFailure) and that it encapsulates an exception of type TExpected.
infix inline fun <TExpected : Throwable> Expect<out Result<*>>.toBeAFailure(noinline assertionCreator: Expect<TExpected>.() -> Unit): Expect<TExpected>
Expects that the subject of this
expectation (a Result) is a failure (Result.isFailure) , that it encapsulates an exception of type TExpected and that the exception holds all assertions the given assertionCreator creates.