doc / ch.tutteli.atrium.assertions / RepresentationOnlyAssertion

RepresentationOnlyAssertion

interface RepresentationOnlyAssertion : Assertion (source)

The base interface for Assertions which only consist of a representation (next to holds).

This assertion is typically used within an AssertionGroup where the description of the group gives enough context so that it is enough if the assertion consists only of a representation of an instance.

For instance, representing isNoneOf(1, 2, 3) can be achieved with an assertion group and inner RepresentationOnlyAssertions.

Properties

representation

abstract val representation: Any?

The representation of an instance such as 1, null etc.

Inherited Functions

holds

abstract fun holds(): Boolean

Indicates whether the assertion holds or not.