public void InvokingAsyncVoidWhichThrowsIsObservedAndRethrown()
        {
            var methodInfo = typeof(WhenStepScannerFactoryAsyncMethods).GetMethod("AsyncTaskMethod", BindingFlags.Instance | BindingFlags.NonPublic);
            var stepAction = StepActionFactory.GetStepAction(methodInfo, new object[] { new SomeScenario() });

            Should.Throw <ArgumentException>(() => AsyncTestRunner.Run(() => stepAction(this)));
        }
        public void CallingAsyncVoidWhichThrowsIsObservedAndRethrown()
        {
            var stepAction = StepActionFactory.GetStepAction <SomeScenario>(s => AsyncVoidMethod(s));

            Should.Throw <ArgumentException>(() => AsyncTestRunner.Run(() => stepAction(new SomeScenario())));
        }
        public void CallingAsyncTaskWhichThrowsIsObservedAndRethrown()
        {
            var stepAction = StepActionFactory.GetStepAction <SomeScenario>(o => AsyncTaskMethod(o));

            Assert.Throws <ArgumentException>(() => stepAction(new SomeScenario()));
        }