In package strikt.api

class strikt.api.ExpectationBuilder

Receiver for expect providing functions that define assertion subjects and create assertion chains or blocks.

Methods

abstract fun <T> that(subject: T): DescribeableBuilder

Start a chain of assertions over subject.

Parameters:
  • subject: T

    the subject of the chain of assertions.

abstract fun <T> that(subject: T, block: Builder.()->Unit): DescribeableBuilder

Evaluate a block of assertions over subject.

Parameters:
  • subject: T

    the subject of the block of assertions.

  • block: Builder.()->Unit

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