public void RunScenarioAsync_should_expose_exception_with_simple_call_stack_when_async_step_throws_it_immediately() { var ex = Assert.ThrowsAsync <InvalidOperationException>(() => _runner.RunScenarioAsync(Async_step_throwing_exception_immediately)); ex.AssertStackTraceMatching( @"^\s*at LightBDD.Framework.UnitTests.Scenarios.Basic.Basic_scenario_exception_stack_trace_integration_tests[^\n]*Async_step_throwing_exception_immediately[^\n]* ([^\n]* )?\s*at LightBDD.Framework.Scenarios.BasicExtensions[^\n]*RunScenarioAsync[^\n]*"); }
public void RunScenarioAsync_should_expose_exception_with_simple_call_stack_when_async_step_throws_it_immediately() { var ex = Assert.ThrowsAsync <InvalidOperationException>(() => _runner.RunScenarioAsync(_ => Async_step_throwing_exception_immediately())); ex.AssertStackTraceMatching( @"^\s*at LightBDD.Framework.UnitTests.Scenarios.Extended.Extended_scenario_exception_stack_trace_integration_tests.<Async_step_throwing_exception_immediately>[^\n]* --- End of stack trace from previous location where exception was thrown --- ([^\n]* )?\s*at LightBDD.Framework.Scenarios.Extended.ExtendedScenarioExtensions.<RunScenarioAsync>[^\n]*"); }