doc / ch.tutteli.atrium.api.infix.en_GB.kotlin_1_3 / toBe

toBe

infix fun <E, T : Result<E>> Expect<T>.toBe(success: success): Expect<E> (source)
Deprecated: Use toBe ASuccess; will be removed with 1.0.0 at the latest

Expects that the subject of this expectation (a Result) is a Success and returns an Expect for the inner type E.

Return
The newly created Expect if the given assertion is success

Since
0.12.0

infix fun <E, T : Result<E>> Expect<T>.toBe(aSuccess: aSuccess): Expect<E> (source)

Expects that the subject of this expectation (a Result) is a success (Result.isSuccess) and returns an Expect for the inner type E.

Return
The newly created Expect if the given assertion is success.

Since
0.17.0

infix fun <E, T : Result<E>> Expect<T>.toBe(success: SuccessWithCreator<E>): Expect<T> (source)

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.

Use the function aSuccess { ... } to create a SuccessWithCreator.

Return
an Expect for the subject of this expectation.

Since
0.12.0