public void Prepare(TScenario scenario)
        {
            var decoratedSagaRepository = new SagaRepositoryTestDecorator <TSaga>(_sagaRepository, _received, _created,
                                                                                  _sagas);

            _unsubscribe = scenario.InputBus.SubscribeStateMachineSaga(_stateMachine, decoratedSagaRepository);
        }
Beispiel #2
0
        public ITestScenarioBuilder <TScenario> Configure(ITestScenarioBuilder <TScenario> builder)
        {
            _received = new ReceivedMessageList(builder.Timeout);
            _created  = new SagaListImpl <TSaga>(builder.Timeout);
            _sagas    = new SagaListImpl <TSaga>(builder.Timeout);

            var decoratedSagaRepository = new SagaRepositoryTestDecorator <TSaga>(_sagaRepository, _received, _created, _sagas);

            var scenarioBuilder = builder as IBusTestScenarioBuilder;

            scenarioBuilder?.ConfigureReceiveEndpoint(x => x.Saga(decoratedSagaRepository));

            return(builder);
        }