checkpointWithArgs
fun <A : Any> checkpointWithArgs(checkpoint: Contract.Checkpoint.WithArgs<A>, args: A): TransmissionTest(source)
Deprecated
Checkpoints are replaced by awaitSignal; with the test DSL, send the next step instead: send(NextStep). Removed in 3.0.
Adds a checkpoint with arguments that will be validated during testing.
⚠️ Experimental API: This API is experimental and may change or be removed in future versions.
This method sets up a checkpoint that will be automatically validated with the provided arguments during test execution. The checkpoint validation happens after the main test transmission is processed.
Return
This TransmissionTest instance for method chaining
Example usage:
transformer.test()
.checkpointWithArgs(ValidationCheckpoint.userConfirmation, ConfirmationData("approved"))
.testSignal(PaymentSignal.ProcessPayment(amount)) {
// Test that payment was processed after confirmation
val paymentData = lastData<PaymentData.Processed>()
assertNotNull(paymentData)
}Content copied to clipboard
Parameters
C
The checkpoint contract type
checkpoint
The checkpoint contract to validate
args
The arguments to provide during checkpoint validation
Type Parameters
A
The type of arguments for checkpoint validation