private ICoreScenarioBuilder NewScenario() { var scenarioRunner = _coreRunner.Integrate().Core; return(_contextProvider != null ? scenarioRunner.WithContext(_contextProvider, _takeContextOwnership) : scenarioRunner); }
public void RunAsynchronous_should_propagate_step_exception() { Assert.ThrowsAsync <NotImplementedException>(() => _runner .Integrate() .NewScenario() .WithCapturedScenarioDetails() .WithSteps(new[] { TestStep.Create(Async_test_throwing_exception) }) .RunAsynchronously()); }
private ICoreScenarioBuilder NewScenario() { var scenarioRunner = _coreRunner.Integrate().Core; if (_contextProvider != null) { return(scenarioRunner.WithContext(_contextProvider, _takeContextOwnership)); } if (_contextResolver != null) { return(scenarioRunner.WithContext(_contextResolver)); } return(scenarioRunner); }
public async Task RunAsync() { try { await _runner.Integrate() .NewScenario() .WithCapturedScenarioDetails() .WithSteps(_steps) .RunScenarioAsync(); } catch (ScenarioExecutionException e) { e.GetOriginal().Throw(); } }
public ContextualBddRunner(IBddRunner coreRunner, Func <IDependencyResolver, object> contextResolver) { Core = coreRunner.Integrate().Core.WithContext(contextResolver); }
public ContextualBddRunner(IBddRunner coreRunner, Func <object> contextProvider, bool takeOwnership) { Core = coreRunner.Integrate().Core.WithContext(contextProvider, takeOwnership); }
private static BasicScenarioRunner Basic(this IBddRunner runner) { return(new BasicScenarioRunner(runner.Integrate())); }
public ContextualBddRunner(IBddRunner coreRunner, Func <IDependencyResolver, object> contextResolver) { _configureScenarioContext = scenario => scenario.WithContext(contextResolver); _coreRunner = coreRunner.Integrate(); }
public ContextualBddRunner(IBddRunner coreRunner, Func <object> contextProvider, bool takeOwnership) { _configureScenarioContext = scenario => scenario.WithContext(contextProvider, takeOwnership); _coreRunner = coreRunner.Integrate(); }
private static ExtendedScenarioRunner <TContext> AsExtended <TContext>(this IBddRunner <TContext> runner) { return(runner.Integrate().AsEnrichable().Enrich(ExtendedScenarioRunner <TContext> .Create)); }
public void Disposed_feature_should_not_allow_creating_new_scenarios() { _feature.Dispose(); Assert.Throws <ObjectDisposedException>(() => _runner.Integrate()); }
public ContextualBddRunner(IBddRunner coreRunner, Func <object> contextProvider) { _contextProvider = contextProvider; _coreRunner = coreRunner.Integrate(); }
public ContextualBddRunner(IBddRunner coreRunner, Func <object> contextProvider, bool takeOwnership) { _contextProvider = contextProvider; _takeOwnership = takeOwnership; _coreRunner = coreRunner.Integrate(); }
public void Integrated_should_throw_if_runner_is_null() { IBddRunner runner = null; Assert.Throws <ArgumentNullException>(() => runner.Integrate()); }
public static TestSyntaxRunner Test(this IBddRunner runner) { return(new TestSyntaxRunner(runner.Integrate())); }