withCheckpoint

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()
.withCheckpoint(ValidationCheckpoint.userConfirmation, ConfirmationData("approved"))
.testSignal(PaymentSignal.ProcessPayment(amount)) {
// Test that payment was processed after confirmation
val paymentData = lastData<PaymentData.Processed>()
assertNotNull(paymentData)
}

Parameters

C

The checkpoint contract type

A

The type of arguments for checkpoint validation

checkpoint

The checkpoint contract to validate

args

The arguments to provide during checkpoint validation


Adds a default checkpoint 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 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()
.withCheckpoint(SecurityCheckpoint.adminApproval)
.testSignal(AdminSignal.DeleteUser(userId)) {
// Test that user was deleted after admin approval
val deletionData = lastData<UserData.Deleted>()
assertNotNull(deletionData)
}

Parameters

checkpoint

The checkpoint contract to validate