private ScenarioContext CreateScenarioContext(Action <IObjectContainer> registerMocks = null)
        {
            IObjectContainer container;

            testRunner = TestTestRunnerFactory.CreateTestRunner(out container, registerMocks);
            return(new ScenarioContext(new ScenarioInfo("sample scenario", new string[0]), testRunner, container));
        }
        protected TestRunner GetTestRunnerFor(Action <IObjectContainer> registerMocks, params Type[] bindingTypes)
        {
            return(TestTestRunnerFactory.CreateTestRunner(
                       container =>
            {
                container.RegisterTypeAs <DummyTestTracer, ITestTracer>();
                container.RegisterInstanceAs(ContextManagerStub);

                var builder = (RuntimeBindingRegistryBuilder)container.Resolve <IRuntimeBindingRegistryBuilder>();
                foreach (var bindingType in bindingTypes)
                {
                    builder.BuildBindingsFromType(bindingType);
                }

                if (registerMocks != null)
                {
                    registerMocks(container);
                }
            }));
        }