doc / ch.tutteli.atrium.logic / createDescriptiveAssertion

createDescriptiveAssertion

fun <T> AssertionContainer<T>.createDescriptiveAssertion(description: Translatable, representation: Any?, test: (T) -> Boolean): Assertion (source)

Creates a DescriptiveAssertion based on the given description, representation and test.

Notice, if you want to use text (a String which is treated as raw string in reporting) as representation, then wrap it into a Text and pass it instead.

Parameters

description - The description of the assertion, e.g. to Be

representation - The representation of the expected outcome

test - The test which checks whether the assertion holds