/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/Testing/IStateMachineSagaTestHarness.cs
61 строка
2 KB
Chris Patterson
Added extra methods to test harness for consumer, saga, and activity endpoints
10 фев 2022, 18:29
10 фев 2022, 18:29
a0ee39c
Код
Авторство
О чём код?
namespace MassTransit.Testing { using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; public interface ISagaStateMachineTestHarness<out TStateMachine, TInstance> : ISagaTestHarness<TInstance> where TStateMachine : SagaStateMachine<TInstance> where TInstance : class, SagaStateMachineInstance { TStateMachine StateMachine { get; } /// <summary> /// Waits until a saga exists with the specified correlationId in the specified state /// </summary> /// <param name="correlationId"></param> /// <param name="stateSelector"></param> /// <param name="timeout"></param> /// <returns></returns> Task<Guid?> Exists(Guid correlationId, Func<TStateMachine, State> stateSelector, TimeSpan? timeout = default); /// <summary> /// Waits until a saga exists with the specified correlationId in the specified state /// </summary> /// <param name="correlationId"></param> /// <param name="state">The expected state</param> /// <param name="timeout"></param> /// <returns></returns> Task<Guid?> Exists(Guid correlationId, State state, TimeSpan? timeout = default); /// <summary> /// Waits until a saga exists with the specified correlationId in the specified state /// </summary> /// <param name="expression"></param> /// <param name="stateSelector"></param> /// <param name="timeout"></param> /// <returns></returns> Task<IList<Guid>> Exists(Expression<Func<TInstance, bool>> expression, Func<TStateMachine, State> stateSelector, TimeSpan? timeout = default); /// <summary> /// Waits until a saga exists with the specified correlationId in the specified state /// </summary> /// <param name="expression"></param> /// <param name="state">The expected state</param> /// <param name="timeout"></param> /// <returns></returns> Task<IList<Guid>> Exists(Expression<Func<TInstance, bool>> expression, State state, TimeSpan? timeout = default); } [Obsolete("Use ISagaStateMachineTestHarness<TStateMachine, TInstance> instead")] public interface IStateMachineSagaTestHarness<TInstance, out TStateMachine> : ISagaStateMachineTestHarness<TStateMachine, TInstance> where TStateMachine : SagaStateMachine<TInstance> where TInstance : class, SagaStateMachineInstance { } }