|
Assert |
sealed class Assert<out T>
An assertion. Holds an actual value to assertion on and an optional name. |
|
InitialValueThreadLocal |
open class InitialValueThreadLocal<T> : ThreadLocal<T> |
|
Result |
sealed class |
|
Table |
sealed class Table
A table of rows to assert on. This makes it easy to run the same assertions are a number of inputs and outputs. |
|
Table1 |
class Table1<C1> : Table
A table with rows of 1 value. |
|
Table1Builder |
class Table1Builder : TableBuilder
Builds a table with the given rows. |
|
Table2 |
class Table2<C1, C2> : Table
A table with rows of 2 values. |
|
Table2Builder |
class Table2Builder : TableBuilder
Builds a table with the given rows. |
|
Table3 |
class Table3<C1, C2, C3> : Table
A table with rows of 3 values. |
|
Table3Builder |
class Table3Builder : TableBuilder
Builds a table with the given rows. |
|
Table4 |
class Table4<C1, C2, C3, C4> : Table
A table with rows of 4 values. |
|
Table4Builder |
class Table4Builder : TableBuilder
Builds a table with the given rows. |
|
TableBuilder |
sealed class TableBuilder
Builds a table with the given rows. |
|
ThreadLocalRef |
open expect class ThreadLocalRef<T> |
|
AssertkDsl |
annotation class AssertkDsl
Marks the assertion DSL. |
annotation expect class PlatformName
Allows to resolve name conflicts from common modules. |
|
AssertBlock |
typealias |
|
ThreadLocalRef |
actual typealias ThreadLocalRef<T> = InitialValueThreadLocal<T> |
var <T> ThreadLocalRef<T>.value: Tvar <T> ThreadLocalRef<T>.value: T |
|
all |
fun <T> Assert<T>.all(message: String, body: Assert<T>.() -> Unit): Unitfun <T> Assert<T>.all(body: Assert<T>.() -> Unit): Unit
All assertions in the given lambda are run. |
|
assert |
fun <T>
Asserts on the given value with an optional name. fun <T>
Asserts on the given block returning an |
|
assertAll |
fun assertAll(f: () -> Unit): Unit
Runs all assertions in the given lambda and reports any failures. |
|
assertThat |
fun <T> assertThat(actual: T, name: String? = null): Assert<T>
Asserts on the given value with an optional name. fun <T> assertThat(getter: KProperty0<T>, name: String? = null): Assert<T>
Asserts on the given property reference using its name, if no explicit name is specified. This method should be preferred in cases, where property references can be used, as it uses the property's name for the assertion automatically. The name may optionally be overridden, if needed. fun <T> assertThat(f: () -> T): Assert<Result<T>>
Asserts on the given block returning an |
|
catch |
fun
Catches any exceptions thrown in the given lambda and returns it. This is an easy way to assert on expected thrown exceptions. |
|
doesNotThrowAnyException |
fun <T> Assert<Result<T>>. |
|
fail |
fun fail(error: AssertionError): Nothing
Fail the test with the given {@link AssertionError}. fun fail(message: String, expected: Any? = NONE, actual: Any? = NONE): Nothing
Fail the test with the given message. |
|
notifyFailure |
fun notifyFailure(e: Throwable): Unit |
|
returnedValue |
fun <T> Assert<Result<T>>.
Runs the given lambda if the block returns a value, otherwise fails. |
|
tableOf |
fun tableOf(name1: String): Table1Builderfun tableOf(name1: String, name2: String): Table2Builderfun tableOf(name1: String, name2: String, name3: String): Table3Builderfun tableOf(name1: String, name2: String, name3: String, name4: String): Table4Builder
Builds a table with the given column names. |
|
thrownError |
fun <T> Assert<Result<T>>.
Runs the given lambda if the block throws an error, otherwise fails. |