Package-level declarations

Types

Link copied to clipboard
sealed class Assert<out T>

An assertion. Holds an actual value to assertion on and an optional name.

Link copied to clipboard
annotation class AssertkDsl

Marks the assertion DSL.

Link copied to clipboard
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.

Link copied to clipboard
class Table1<C1> : Table

A table with rows of 1 value.

Link copied to clipboard

Builds a table with the given rows.

Link copied to clipboard
class Table2<C1, C2> : Table

A table with rows of 2 values.

Link copied to clipboard

Builds a table with the given rows.

Link copied to clipboard
class Table3<C1, C2, C3> : Table

A table with rows of 3 values.

Link copied to clipboard

Builds a table with the given rows.

Link copied to clipboard
class Table4<C1, C2, C3, C4> : Table

A table with rows of 4 values.

Link copied to clipboard

Builds a table with the given rows.

Link copied to clipboard
sealed class TableBuilder

Builds a table with the given rows.

Link copied to clipboard
actual open class ThreadLocalRef<T>(initial: () -> T)
actual open class ThreadLocalRef<T>(initial: () -> T) : ThreadLocal<T>
expect open class ThreadLocalRef<TT>(initial: () -> T)
actual open class ThreadLocalRef<TT>(initial: () -> T)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun <T> Assert<T>.all(body: Assert<T>.() -> Unit)
fun <T> Assert<T>.all(message: String, body: Assert<T>.() -> Unit)

All assertions in the given lambda are run.

Link copied to clipboard
inline fun assertAll(f: () -> Unit)

Runs all assertions in the given lambda and reports any failures.

Link copied to clipboard
inline fun assertFailure(f: () -> Unit): Assert<Throwable>

Asserts that the given block will throw an exception rather than complete successfully.

Link copied to clipboard
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(actual: T, name: String? = null, displayActual: (T) -> String = { display(it) }): Assert<T>

Asserts on the given value with an optional name.

Link copied to clipboard

Fail the test with the given {@link AssertionError}.

fun fail(message: String, expected: Any? = NONE, actual: Any? = NONE, cause: Throwable? = null): Nothing

Fail the test with the given message.

Link copied to clipboard
Link copied to clipboard
fun tableOf(name1: String, name2: String): Table2Builder
fun tableOf(name1: String, name2: String, name3: String): Table3Builder
fun tableOf(name1: String, name2: String, name3: String, name4: String): Table4Builder

Builds a table with the given column names.