Then

interface Then<M, F>

The final step in a behavior test. Instances of this class will call your function under test with the previously provided values (i.e. given and when) and will pass the result of the function over to your Assert implementation. If you choose to call thenError, your function under test will be invoked and any exceptions thrown will be caught and passed on to your AssertError implementation. If no exceptions are thrown by the function under test, then an AssertError will be thrown to fail the test.

Functions

Link copied to clipboard
abstract fun then(assertion: InitSpec.Assert<M, F>)

Runs the specified test and then runs the Assert on the resulting First.

Link copied to clipboard
abstract fun thenError(assertion: InitSpec.AssertError)

Runs the specified test and validates that it throws the exception expected by the supplied AssertError.