doc / ch.tutteli.atrium.verbs

Package ch.tutteli.atrium.verbs

Contains the out-of-the-box Assertion Verbs such as assert, assertThat and expect.

Types

AssertionVerb

enum class AssertionVerb : StringBasedTranslatable

The Translatables for the assertion functions assert, assertThat and expect.

Functions

assert

fun <T : Any> assert(subject: T): <ERROR CLASS>

Creates an AssertionPlant for the given subject.

fun <T : Any> assert(subject: T, assertionCreator: Assert<T>.() -> Unit): <ERROR CLASS>

Creates an AssertionPlant for the given subject and AssertionPlant.addAssertionsCreatedBy the given assertionCreator lambda where the created Assertions are added as a group and usually (depending on the configured Reporter) reported as a whole.

fun assert(act: () -> Unit): Builder

Creates a ThrowableThrown.Builder for the given function act which is expected to throw a Throwable.

assertThat

fun <T : Any> assertThat(subject: T): <ERROR CLASS>

Creates an AssertionPlant for the given subject.

fun <T : Any> assertThat(subject: T, assertionCreator: Assert<T>.() -> Unit): <ERROR CLASS>

Creates an AssertionPlant for the given subject and AssertionPlant.addAssertionsCreatedBy the given assertionCreator lambda where the created Assertions are added as a group and usually (depending on the configured Reporter) reported as a whole.

fun assertThat(act: () -> Unit): Builder

Creates a ThrowableThrown.Builder for the given function act which is expected to throw a Throwable.

expect

fun <T : Any> expect(subject: T): <ERROR CLASS>

Creates an AssertionPlant for the given subject.

fun <T : Any> expect(subject: T, assertionCreator: Assert<T>.() -> Unit): <ERROR CLASS>

Creates an AssertionPlant for the given subject and AssertionPlant.addAssertionsCreatedBy the given assertionCreator lambda where the created Assertions are added as a group and usually (depending on the configured Reporter) reported as a whole.

fun expect(act: () -> Unit): Builder

Creates a ThrowableThrown.Builder for the given function act which is expected to throw a Throwable.