public TestStepContext()
        {
            // Oh good grief - it turns out SimpleInjector.Verify() creates an instance of *every* registration,
            // yet fails to call Dispose() on IDisposables -- quite annoying.  I don't want to completely get rid of the Verify(), 
            // so we'll just allow this constructor to reset the TestStepContext instead of throwing an exception
            // if( TestStepContext.Current != null)
            //    throw new InvalidOperationException("Invalid attempt to create a new TestStepContext when one was already established on this call context.  (did you fail to Dispose() the last one?)");

            TestStepContext.Current = this;
            this.PerformanceFailAction = StepPerformanceFailureAction.FailTest;

            this.adapter = (ITestFrameworkAdapter) Bootstrapper.InternalLocator.GetService(typeof(ITestFrameworkAdapter));
        }
Beispiel #2
0
 public TestScenarioBuilder(TMessage message, ITestFrameworkAdapter testAdapter)
 {
     this.scenario    = new TestScenario <TMessage>(message);
     this.testAdapter = testAdapter;
 }
 internal TestScenarioExecutor(TestScenario <TMessage> scenario, ITestFrameworkAdapter testAdapter)
 {
     this.scenario    = scenario;
     this.testAdapter = testAdapter;
     this.interceptor = new PublishedMessageInterceptor();
 }
 public static void SetTestFrameworkAdapter(ITestFrameworkAdapter adapter)
 {
     Check.NotNull(adapter, nameof(adapter));
     _current = adapter;
 }
Beispiel #5
0
 public static void SetAdapter(ITestFrameworkAdapter adapter)
 {
     _adapter = adapter;
 }