public IHandlerTest <TScenario, TMessage> Build()
        {
            var handlerTestSubject = new HandlerTestSubject <TScenario, TMessage>(_handler);

            AddScenarioConfigurator(handlerTestSubject);

            TScenario scenario = BuildTestScenario();

            IHandlerTestBuilder <TScenario, TMessage> builder = new HandlerTestBuilder <TScenario, TMessage>(scenario, handlerTestSubject);

            builder = _configurators.Aggregate(builder, (current, configurator) => configurator.Configure(current));

            BuildTestActions(builder);

            return(builder.Build());
        }
Exemplo n.º 2
0
 public HandlerTestInstance(TScenario scenario, IList <TestAction <TScenario> > actions,
                            Action <IConsumeContext <TMessage>, TMessage> handler)
     : base(scenario, actions)
 {
     _subject = new HandlerTestSubject <TScenario, TMessage>(handler);
 }