doc / ch.tutteli.atrium.verbs.assert / assert

assert

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

Creates an IAssertionPlant for the given subject.

Return
The newly created plant.

See Also

AtriumFactory.newReportingPlant

fun <T : Any> assert(subject: T, assertionCreator: IAssertionPlant<T>.() -> Unit): IAssertionPlant<T>

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

Return
The newly created plant.

See Also

IAtriumFactory.newReportingPlantAndAddAssertionsCreatedBy

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

Creates an ThrowableThrownBuilder for the given function act which is expected to throw a Throwable.

Return
The newly created ThrowableThrownBuilder.