doc / ch.tutteli.atrium.verbs.expect / expect

expect

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

Creates an IAssertionPlant for the given subject.

Return
The newly created plant.

See Also

AtriumFactory.newReportingPlant

fun <T : Any> expect(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 expect(act: () -> Unit): ThrowableThrownBuilder

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

Return
The newly created ThrowableThrownBuilder.