corda / net.corda.testing.core / expect


fun <E : Any> expect(klass: Class<E>, match: (E) -> Boolean, expectClosure: (E) -> Unit): ExpectCompose<E>

Expect an event of type T and run expectClosure on it


klass - The Class to use for checking the incoming event's type

match - Optional additional matching logic

expectClosure - The closure to run on the event

inline fun <reified E : Any> expect(noinline match: (E) -> Boolean = { true }, noinline expectClosure: (E) -> Unit): ExpectCompose<E>

Convenience variant of expect reifying the Class parameter

inline fun <reified E : Any> expect(event: E, noinline expectClosure: (E) -> Unit = {}): ExpectCompose<E>

Convenience variant of expect that only matches events that are strictly equal to event