Exemple #1
0
        public ConsumerTest <TScenario, TConsumer> Build()
        {
            TScenario context = BuildTestScenario();

            IConsumerTestBuilder <TScenario, TConsumer> builder = _builderFactory(context);

            builder.SetConsumerFactory(_consumerFactory);

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

            BuildTestActions(builder);

            return(builder.Build());
        }
        public IConsumerTest <TScenario, TConsumer> Build()
        {
            // TODO pull from scenario
            _received = new ReceivedMessageList(TimeSpan.FromSeconds(8));

            AddScenarioConfigurator(new ConsumerScenarioSpecification(_consumerFactory, _received));

            TScenario scenario = BuildTestScenario();

            IConsumerTestBuilder <TScenario, TConsumer> builder = _testBuilderFactory(scenario);

            builder.SetConsumerFactory(_consumerFactory);

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

            BuildTestActions(builder);

            return(builder.Build());
        }