Companion
Functions
Link copied to clipboard
context(assertionScope: AssertionScope)
inline fun Expect.Companion.notToThrow(crossinline block: () -> Unit)
inline fun Expect.Companion.notToThrow(crossinline block: () -> Unit)
Asserts that the given block does not throw any exception.
context(assertionScope: AssertionScope)
inline fun <Result> Expect.Companion.notToThrow(crossinline block: () -> Result, checker: Expect<Result>.() -> Unit)
inline fun <Result> Expect.Companion.notToThrow(crossinline block: () -> Result, checker: Expect<Result>.() -> Unit)
Link copied to clipboard
Link copied to clipboard
context(assertionScope: AssertionScope)
inline fun Expect.Companion.toThrow(crossinline block: () -> Unit)
inline fun Expect.Companion.toThrow(crossinline block: () -> Unit)
Asserts that the given block throws an exception.
context(assertionScope: AssertionScope)
inline fun <ThrowableType : Throwable> Expect.Companion.toThrow(crossinline block: () -> Unit, checker: Expect<ThrowableType>.() -> Unit)
Asserts that the given block throws an exception of the specified type ThrowableType, and if it does, asserts on the thrown exception using the provided checker.
context(assertionScope: AssertionScope)
inline fun Expect.Companion.toThrow(crossinline block: () -> Unit, checker: Expect<Throwable>.() -> Unit)
inline fun Expect.Companion.toThrow(crossinline block: () -> Unit, checker: Expect<Throwable>.() -> Unit)