Beispiel #1
0
        private void InitializeExecutionMessageHandlers()
        {
            var tableFormatter       = new TableFormatter(this._assemblyLoader, this._activatorWrapper);
            var classInstanceManager = new ThreadLocal <object>(() =>
            {
                return(this._assemblyLoader.GetClassInstanceManager());
            });
            var executionInfoMapper   = new ExecutionInfoMapper(this._assemblyLoader, this._activatorWrapper);
            var executionOrchestrator = new ExecutionOrchestrator(this._reflectionWrapper, this._assemblyLoader,
                                                                  classInstanceManager.Value,
                                                                  new HookExecutor(this._assemblyLoader, this._reflectionWrapper, classInstanceManager.Value, executionInfoMapper),
                                                                  new StepExecutor(this._assemblyLoader, this._reflectionWrapper, classInstanceManager.Value));

            this.executionStartingProcessor         = new ExecutionStartingProcessor(executionOrchestrator);
            this.executionEndingProcessor           = new ExecutionEndingProcessor(executionOrchestrator);
            this.specExecutionStartingProcessor     = new SpecExecutionStartingProcessor(executionOrchestrator);
            this.specExecutionEndingProcessor       = new SpecExecutionEndingProcessor(executionOrchestrator);
            this.scenarioExecutionStartingProcessor = new ScenarioExecutionStartingProcessor(executionOrchestrator);
            this.scenarioExecutionEndingProcessor   = new ScenarioExecutionEndingProcessor(executionOrchestrator);
            this.stepExecutionStartingProcessor     = new StepExecutionStartingProcessor(executionOrchestrator);
            this.stepExecutionEndingProcessor       = new StepExecutionEndingProcessor(executionOrchestrator);
            this.executeStepProcessor           = new ExecuteStepProcessor(_stepRegistry, executionOrchestrator, tableFormatter);
            this.scenarioDataStoreInitProcessor = new ScenarioDataStoreInitProcessor(this._assemblyLoader);
            this.specDataStoreInitProcessor     = new SpecDataStoreInitProcessor(this._assemblyLoader);
            this.suiteDataStoreInitProcessor    = new SuiteDataStoreInitProcessor(this._assemblyLoader);
        }
        private void InitializeExecutionMessageHandlers()
        {
            var activatorWrapper  = new ActivatorWrapper();
            var reflectionWrapper = new ReflectionWrapper();
            var assemblies        = new AssemblyLocater(new DirectoryWrapper(), new FileWrapper()).GetAllAssemblies();
            var assemblyLoader    = new AssemblyLoader(new AssemblyWrapper(), assemblies, reflectionWrapper, activatorWrapper);

            _stepRegistry = assemblyLoader.GetStepRegistry();
            var tableFormatter        = new TableFormatter(assemblyLoader, activatorWrapper);
            var classInstanceManager  = assemblyLoader.GetClassInstanceManager();
            var executionOrchestrator = new ExecutionOrchestrator(reflectionWrapper, assemblyLoader, activatorWrapper,
                                                                  classInstanceManager,
                                                                  new HookExecutor(assemblyLoader, reflectionWrapper, classInstanceManager),
                                                                  new StepExecutor(assemblyLoader, reflectionWrapper, classInstanceManager));

            this.executionStartingProcessor         = new ExecutionStartingProcessor(executionOrchestrator);
            this.executionEndingProcessor           = new ExecutionEndingProcessor(executionOrchestrator);
            this.specExecutionStartingProcessor     = new SpecExecutionStartingProcessor(executionOrchestrator);
            this.specExecutionEndingProcessor       = new SpecExecutionEndingProcessor(executionOrchestrator);
            this.scenarioExecutionStartingProcessor = new ScenarioExecutionStartingProcessor(executionOrchestrator);
            this.scenarioExecutionEndingProcessor   = new ScenarioExecutionEndingProcessor(executionOrchestrator);
            this.stepExecutionStartingProcessor     = new StepExecutionStartingProcessor(executionOrchestrator);
            this.stepExecutionEndingProcessor       = new StepExecutionEndingProcessor(executionOrchestrator);
            this.executeStepProcessor           = new ExecuteStepProcessor(_stepRegistry, executionOrchestrator, tableFormatter);
            this.scenarioDataStoreInitProcessor = new ScenarioDataStoreInitProcessor(assemblyLoader);
            this.specDataStoreInitProcessor     = new SpecDataStoreInitProcessor(assemblyLoader);
            this.suiteDataStoreInitProcessor    = new SuiteDataStoreInitProcessor(assemblyLoader);
        }