public class AssertBlock<T>
An assertion on a block of code. Can assert that it either throws and error or returns a value.
| Modifier and Type | Method and Description |
|---|---|
void |
doesNotThrowAnyException() |
void |
returnedValue(kotlin.jvm.functions.Function1<? super assertk.Assert<? extends T>,kotlin.Unit> f)
Runs the given lambda if the block returns a value, otherwise fails.
|
void |
thrownError(kotlin.jvm.functions.Function1<? super assertk.Assert<? extends java.lang.Throwable>,kotlin.Unit> f)
Runs the given lambda if the block throws an error, otherwise fails.
|
public void thrownError(kotlin.jvm.functions.Function1<? super assertk.Assert<? extends java.lang.Throwable>,kotlin.Unit> f)
Runs the given lambda if the block throws an error, otherwise fails.
public void returnedValue(kotlin.jvm.functions.Function1<? super assertk.Assert<? extends T>,kotlin.Unit> f)
Runs the given lambda if the block returns a value, otherwise fails.
public void doesNotThrowAnyException()