Task ISubSystem.Start() { return(Task.Factory.StartNew(() => { var settings = StoryTellerEnvironment.Get <SerenityEnvironment>(); WebDriverSettings.Import(settings); FubuMvcPackageFacility.PhysicalRootPath = _settings.PhysicalPath; _runtime = _runtimeSource(); var browserLifecycle = WebDriverSettings.GetBrowserLifecyle(ChooseBrowserType()); _hosting = _settings.RootUrl.IsEmpty() ? (ISerenityHosting) new KatanaHosting() : new ExternalHosting(); _application = _hosting.Start(_settings, _runtime, browserLifecycle); _applicationAlterations.Each(x => x(_application)); _binding = _application.Services.GetInstance <BindingRegistry>(); _bindingRegistrations.Each(x => x(_binding)); configureApplication(_application, _binding); _contextualProviders = _runtime.Factory.GetAll <IContextualInfoProvider>(); _runtime.Facility.Register(typeof(IApplicationUnderTest), ObjectDef.ForValue(_application)); _runtime.Facility.Register(typeof(IRemoteSubsystems), ObjectDef.ForValue(this)); })); }
Task ISubSystem.Start() { return(Task.Factory.StartNew(() => { FubuMvcPackageFacility.PhysicalRootPath = _settings.PhysicalPath; _runtime = _runtimeSource(); var browserLifecycle = WebDriverSettings.GetBrowserLifecyle(ChooseBrowserType()); SetupApplicationHost(); _application = _hosting.Start(_settings, _runtime, browserLifecycle); _applicationAlterations.Each(x => x(_application)); _runtime.Facility.Register(typeof(IApplicationUnderTest), ObjectDef.ForValue(_application)); _runtime.Facility.Register(typeof(IRemoteSubsystems), ObjectDef.ForValue(this)); })); }