WorkflowTestType
PackageFCQRS.Workflows
Runs workflows in memory, for tests. See `WorkflowTest<'Input, 'Result>`.
Specification
Kind
Type
Members
7
Examples
0
RecoverSignature
WorkflowTest.Recover(workflow, journal)
RecoverSignature
WorkflowTest.Recover(definition, journal)
StartSignature
WorkflowTest.Start(workflow, input)
StartSignature
WorkflowTest.Start(workflow, input, now)
StartSignature
WorkflowTest.Start(definition, input)
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Recover | WorkflowTest.Recover(workflow, journal) | Recovers a C# workflow's instance from a stored journal. |
| Recover | WorkflowTest.Recover(definition, journal) | Recovers an instance from a stored journal, such as one a test of the previous version of the workflow produced, and runs this code over it, as the process does after a deploy. |
| Start | WorkflowTest.Start(workflow, input) | Starts a C# workflow with `input` at `WorkflowTest.DefaultStart`. |
| Start | WorkflowTest.Start(workflow, input, now) | Starts a C# workflow with `input` at `now`. |
| Start | WorkflowTest.Start(definition, input) | Starts the workflow with `input` at `WorkflowTest.DefaultStart`. |
| Start | WorkflowTest.Start(definition, input, now) | Starts the workflow with `input` at `now`, and runs the body until it waits. |
| DefaultStart | WorkflowTest.DefaultStart | The time a test starts at unless it gives one: 1 January 2026, 00:00 UTC. |
Recovers a C# workflow's instance from a stored journal. See the definition overload.
Parameters
| Name | Type | Description |
|---|---|---|
| workflow | Workflow<'Input, 'Result> | |
| journal | WorkflowRecord seq |
Returns
WorkflowTest<'Input, 'Result>
Recovers an instance from a stored journal, such as one a test of the previous version of
the workflow produced, and runs this code over it, as the process does after a deploy.
`Status` reports `Parked` when the journal does not match the code. The test's time starts
at the last record's time.
Parameters
| Name | Type | Description |
|---|---|---|
| definition | WorkflowDefinition<'Input, 'Result> | |
| journal | WorkflowRecord seq |
Returns
WorkflowTest<'Input, 'Result>
Starts a C# workflow with `input` at `WorkflowTest.DefaultStart`.
Parameters
| Name | Type | Description |
|---|---|---|
| workflow | Workflow<'Input, 'Result> | |
| input | 'Input |
Returns
WorkflowTest<'Input, 'Result>
Starts a C# workflow with `input` at `now`.
Parameters
| Name | Type | Description |
|---|---|---|
| workflow | Workflow<'Input, 'Result> | |
| input | 'Input | |
| now | DateTime |
Returns
WorkflowTest<'Input, 'Result>
Starts the workflow with `input` at `WorkflowTest.DefaultStart`.
Parameters
| Name | Type | Description |
|---|---|---|
| definition | WorkflowDefinition<'Input, 'Result> | |
| input | 'Input |
Returns
WorkflowTest<'Input, 'Result>
Starts the workflow with `input` at `now`, and runs the body until it waits. The input is
stored and read back, as `Start` does.
Parameters
| Name | Type | Description |
|---|---|---|
| definition | WorkflowDefinition<'Input, 'Result> | |
| input | 'Input | |
| now | DateTime |
Returns
WorkflowTest<'Input, 'Result>