doc / ch.tutteli.atrium.creating / AssertionContainer / createAndAppend

createAndAppend

open fun createAndAppend(description: String, expected: Any?, test: (T) -> Boolean): Expect<T> (source)
open fun createAndAppend(description: Translatable, expected: Any?, test: (T) -> Boolean): Expect<T> (source)

Creates a DescriptiveAssertion based on the given description, expected and test and appends it to the container.

Parameters

description - The description of the assertion, e.g., is less than.

expected - The expected value, e.g., 5

test - Indicates whether the assertion holds or fails.

Return
an Expect for the subject of this expectation.