doc / ch.tutteli.atrium.assertions.builders.common / HoldsStep / withTest

withTest

abstract fun withTest(test: () -> Boolean): R (source)

Uses the given test as Assertion.holds.

abstract fun <T> withTest(expect: Expect<T>, test: (T) -> Boolean): R (source)

Uses the given test as Assertion.holds based on the subject provided by subjectProvider.

Notice, this function might change its signature with 1.0.0 to something like

fun <T> withTest(expect: Expect, test: (T) -> Boolean): DescriptionOption<FinalStep>

Return
true in case SubjectProvider.maybeSubject is None or the result of test passing the subject.