open fun createAndAddAssertion(description: Translatable, expected: Any, test: () -> Boolean): AssertionPlant<T>
Creates a DescriptiveAssertion based on the given description, expected and test and adds it to the plant.
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.
AssertionError
- Might throw an AssertionError in case Assertions are immediately
evaluated (see ReportingAssertionPlant).
Return
This plant to support a fluent API.