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

expect

fun <T> expect(subject: T): RootExpect<T> (source)

Creates an Expect for the given subject.

Parameters

subject - The subject for which we are going to postulate assertions.

Exceptions

AssertionError - in case an assertion does not hold.

Return
The newly created Expect.

fun <T> expect(subject: T, assertionCreator: Expect<T>.() -> Unit): Expect<T> (source)

Creates an Expect for the given subject and appends the expectations the given assertionCreator-lambda creates as group to it.

Parameters

subject - The subject for which we are going to postulate assertions.

assertionCreator - Assertion group block with a non-fail fast behaviour.

Exceptions

AssertionError - in case an assertion does not hold.

Return
The newly created Expect.

fun <T, R> Expect<T>.expect(newSubject: R): FeatureExpect<T, R> (source)
Deprecated: `expect` should not be nested, use `feature` or `its` instead.