isFailure
|
fun <TExpected : Throwable> Expect<out Result<*>>.isFailure(): Expect<TExpected>
Expects that the subject of this expectation (a Result) is a Failure and
that it encapsulates an exception of type TExpected.
fun <TExpected : Throwable> Expect<out Result<*>>.isFailure(assertionCreator: Expect<TExpected>.() -> Unit): Expect<TExpected>
Expects that the subject of this expectation (a Result) is a Failure,
it encapsulates an exception of type TExpected and that the exception
holds all assertions the given assertionCreator creates.
|
isSuccess
|
fun <E, T : Result<E>> Expect<T>.isSuccess(): Expect<E>
Expects that the subject of this expectation (a Result) is a Success
and returns an Expect for the inner type E.
fun <E, T : Result<E>> Expect<T>.isSuccess(assertionCreator: Expect<E>.() -> Unit): Expect<T>
Expects that the subject of this expectation (a Result) is a Success and
that it holds all assertions the given assertionCreator creates.
|
toBeAFailure
|
fun <TExpected : Throwable> Expect<out Result<*>>.toBeAFailure(): Expect<TExpected>
Expects that the subject of this expectation (a Result) is a failure (Result.isFailure) and
that it encapsulates an exception of type TExpected.
fun <TExpected : Throwable> Expect<out Result<*>>.toBeAFailure(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.
|
toBeASuccess
|
fun <E, T : Result<E>> Expect<T>.toBeASuccess(): Expect<E>
Expects that the subject of this expectation (a Result) is a success (Result.isSuccess)
and returns an Expect for the inner type E.
fun <E, T : Result<E>> Expect<T>.toBeASuccess(assertionCreator: Expect<E>.() -> Unit): Expect<T>
Expects that the subject of this expectation (a Result) is a success (Result.isSuccess) and
that it holds all assertions the given assertionCreator creates.
|