verify

open fun verify(): VerifiedStage<S>

Executes all accumulated expectations and returns a verified stage.

This method immediately verifies all expectations that have been set up, throwing an exception if any expectations fail.

Return

a VerifiedStage containing the verified results

Throws

if any expectations fail


abstract fun verify(immediately: Boolean): VerifiedStage<S>

Executes expectations based on the immediate flag.

When immediately is true, all expectations are verified immediately. When false, verification is deferred until the result is accessed.

Return

a VerifiedStage containing the results

Parameters

immediately

whether to verify expectations immediately

Throws

if immediately is true and any expectations fail