Package-level declarations

Functions

Link copied to clipboard
inline fun <M> Assert<Iterable<AsyncResult<*>>>.allErrorMetadata(): Assert<List<M>>

Returns all metadata instances of type M from Error elements in the collection.

Link copied to clipboard
fun Assert<Iterable<AsyncResult<*>>>.allErrors(): Assert<List<Error>>

Returns all Error instances from the collection for further assertions.

Link copied to clipboard
suspend fun Flow<AsyncResult<*>>.assertError(): Error

Asserts the first terminal emission from the flow is Error and returns it for further checks.

Link copied to clipboard
suspend fun <T> Flow<AsyncResult<T>>.assertErrorWithId(expected: ErrorId)

Asserts the first terminal emission from the flow is Error with the given ErrorId.

Link copied to clipboard
inline suspend fun <M> Flow<AsyncResult<*>>.assertErrorWithMetadata(): M

Asserts the first terminal emission from the flow is Error with metadata of type M and returns it.

Link copied to clipboard
inline suspend fun <E : Throwable> Flow<AsyncResult<*>>.assertErrorWithThrowableOfType(): E

Asserts the first terminal emission from the flow is Error with a Throwable of type E and returns it.

Link copied to clipboard
suspend fun <T> Flow<AsyncResult<T>>.assertFirstIsIncomplete()

Asserts the first emission from the flow is Incomplete.

Link copied to clipboard
suspend fun <T> Flow<AsyncResult<T>>.assertFirstIsLoading()

Asserts the first emission from the flow is Loading.

Link copied to clipboard
suspend fun <T> Flow<AsyncResult<T>>.assertFirstIsNotStarted()

Asserts the first emission from the flow is NotStarted.

Link copied to clipboard
suspend fun <T> Flow<AsyncResult<T>>.assertSuccess(expected: T)

Asserts the first terminal emission from the flow is Success with the given expected value.

Link copied to clipboard

Asserts the collection contains at least one Incomplete element.

Link copied to clipboard

Asserts the collection contains at least one Loading element.

Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.hasErrorId(expected: ErrorId)

Asserts the AsyncResult has the given ErrorId if it's an Error, checking via extension.

Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isError(): Assert<Error>
Link copied to clipboard
fun Assert<Error>.isErrorIdEqualTo(expected: ErrorId)

Asserts the Error has the given ErrorId.

Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isErrorWithId(): Assert<ErrorId>

Asserts the AsyncResult is an Error with an ErrorId and returns the ErrorId.

Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isErrorWithIdEqualTo(expected: ErrorId)

Asserts the AsyncResult is an Error with the given ErrorId.

Link copied to clipboard
inline fun <M> Assert<AsyncResult<*>>.isErrorWithMetadata(): Assert<M>
Link copied to clipboard
inline fun <M> Assert<AsyncResult<*>>.isErrorWithMetadataEqualTo(value: M)
Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isErrorWithThrowable(): Assert<Throwable>

Asserts the AsyncResult is an Error with a non-null throwable and returns it.

Link copied to clipboard

Asserts the AsyncResult is an Error with a throwable message matching expected.

Link copied to clipboard
inline fun <E : Throwable> Assert<AsyncResult<*>>.isErrorWithThrowableOfType(): Assert<E>

Asserts the AsyncResult is an Error with a throwable of the specified type.

Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isIncomplete(): Assert<Incomplete>
Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isLoading(): Assert<Loading>
Link copied to clipboard
inline fun <T, M> Assert<Error>.isMetadataEqualTo(value: M)
Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isNotStarted(): Assert<NotStarted>
Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isSuccess(): Assert<T>
Link copied to clipboard
fun <T> Assert<AsyncResult<T>>.isSuccessEqualTo(expected: T)
Link copied to clipboard
inline fun <T, E> Assert<Error>.isThrowableEqualTo(expected: E)