strikt-core / strikt.api / Assertion / Builder / with

with

abstract fun <R> with(description: String, function: T.() -> R, block: Builder<R>.() -> Unit): Builder<T>

Runs a group of assertions on the subject returned by function.

Parameters

description - a description of the mapped result.

function - a lambda whose receiver is the current assertion subject.

block - a closure that can perform multiple assertions that will all be evaluated regardless of whether preceding ones pass or fail.

R - the mapped subject type.

Return
this builder, to facilitate chaining.

open fun <R> with(function: T.() -> R, block: Builder<R>.() -> Unit): Builder<T>

Runs a group of assertions on the subject returned by function.

Parameters

function - a lambda whose receiver is the current assertion subject.

block - a closure that can perform multiple assertions that will all be evaluated regardless of whether preceding ones pass or fail.

R - the mapped subject type.

Return
this builder, to facilitate chaining.