Exemple #1
0
 public RunnableScenario(ScenarioInfo scenario, Func <DecoratingExecutor, object, RunnableStep[]> stepsProvider, IContextProvider contextProvider, IScenarioProgressNotifier progressNotifier, DecoratingExecutor decoratingExecutor, IEnumerable <IScenarioDecorator> scenarioDecorators, ExceptionProcessor exceptionProcessor)
 {
     _info               = scenario;
     _stepsProvider      = stepsProvider;
     _contextProvider    = contextProvider;
     _progressNotifier   = progressNotifier;
     _decoratingExecutor = decoratingExecutor;
     _scenarioDecorators = scenarioDecorators;
     _exceptionProcessor = exceptionProcessor;
     _result             = new ScenarioResult(_info);
 }
Exemple #2
0
 public RunnableStep(StepInfo stepInfo, Func <object, object[], Task <CompositeStepContext> > stepInvocation, MethodArgument[] arguments, ExceptionProcessor exceptionProcessor, IScenarioProgressNotifier progressNotifier, DecoratingExecutor decoratingExecutor, object scenarioContext, IEnumerable <IStepDecorator> stepDecorators)
 {
     _result             = new StepResult(stepInfo);
     _stepInvocation     = stepInvocation;
     _arguments          = arguments;
     _exceptionProcessor = exceptionProcessor;
     _progressNotifier   = progressNotifier;
     _decoratingExecutor = decoratingExecutor;
     _scenarioContext    = scenarioContext;
     _stepDecorators     = stepDecorators;
     UpdateNameDetails();
 }
Exemple #3
0
        public Task ExecuteAsync(ScenarioInfo scenario, Func <DecoratingExecutor, object, RunnableStep[]> stepsProvider, IContextProvider contextProvider, IScenarioProgressNotifier progressNotifier, IEnumerable <IScenarioDecorator> scenarioDecorators, ExceptionProcessor exceptionProcessor)
        {
            var runnableScenario = new RunnableScenario(scenario, stepsProvider, contextProvider, progressNotifier, _decoratingExecutor, scenarioDecorators, exceptionProcessor);

            try
            {
                return(runnableScenario.RunAsync());
            }
            finally
            {
                ScenarioExecuted?.Invoke(runnableScenario.Result);
            }
        }