27 lines
722 B
C#
27 lines
722 B
C#
using Elsa.Workflows.CommitStates;
|
|
using Elsa.Workflows.State;
|
|
|
|
namespace Elsa.Workflows.IntegrationTests.SharedHelpers;
|
|
|
|
/// <summary>
|
|
/// Test helper to track commit invocations
|
|
/// </summary>
|
|
public class CommitTracker : ICommitStateHandler
|
|
{
|
|
public int CommitCount { get; private set; }
|
|
|
|
public Task CommitAsync(WorkflowExecutionContext workflowExecutionContext, CancellationToken cancellationToken = default)
|
|
{
|
|
CommitCount++;
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task CommitAsync(WorkflowExecutionContext workflowExecutionContext, WorkflowState workflowState, CancellationToken cancellationToken = default)
|
|
{
|
|
CommitCount++;
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|