예제 #1
0
 private RunnableStep[] PrepareSteps()
 {
     try
     {
         return(_scenarioContext.StepsProvider(_stepDescriptors, Context, _scope, string.Empty, ShouldAbortSubStepExecution));
     }
     catch (Exception e)
     {
         throw new InvalidOperationException($"Step initialization failed: {e.Message}", e);
     }
 }
예제 #2
0
 private void PrepareSteps()
 {
     try
     {
         _preparedSteps = _scenarioContext.StepsProvider(_result.Info, _stepDescriptors, Context, _scope, string.Empty, ShouldAbortSubStepExecution);
     }
     catch (Exception e)
     {
         throw new InvalidOperationException($"Scenario steps initialization failed: {e.Message}", e);
     }
     if (_preparedSteps.Any(x => x.Result.ExecutionException != null))
     {
         throw new InvalidOperationException("Scenario steps initialization failed.");
     }
 }