Beispiel #1
0
        public override sealed void SetUp(ITestContext context)
        {
            // TODO -- later, make this thing be able to swap up the application under test
            _application = context.Retrieve<IApplicationUnderTest>();

            beforeRunning();
        }
Beispiel #2
0
        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));
            }));
        }
Beispiel #3
0
        public override sealed void SetUp(ITestContext context)
        {
            // TODO -- later, make this thing be able to swap up the application under test
            _application = context.Retrieve <IApplicationUnderTest>();

            beforeRunning();
        }
Beispiel #4
0
        public FubuMvcContext(IApplicationUnderTest application, BindingRegistry binding, IEnumerable<IContextualInfoProvider> contextualProviders )
        {
            _application = application;
            _binding = binding;

            _contextualProviders = contextualProviders ?? new IContextualInfoProvider[0];

            _contextualProviders.Each(x => x.Reset());
        }
Beispiel #5
0
        public FubuMvcContext(IApplicationUnderTest application, BindingRegistry binding, IEnumerable <IContextualInfoProvider> contextualProviders)
        {
            _application = application;
            _binding     = binding;

            _contextualProviders = contextualProviders ?? new IContextualInfoProvider[0];

            _contextualProviders.Each(x => x.Reset());
        }
        public void SetUp()
        {
            var context = new TestContext();
            theSystem = new InProcessSerenitySystem<KayakApplication>();
            theSystem.Setup();
            theSystem.RegisterServices(context);

            theApplication = theSystem.Get<IApplicationUnderTest>();
            theDriver = theApplication.Navigation;
        }
        public void SetUp()
        {
            FubuMvcPackageFacility.PhysicalRootPath = FileSystem.Combine("..", "..", "..", "KayakTestApplication");

            var context = new TestContext();
            theSystem = new InProcessSerenitySystem<KayakApplication>();
            theSystem.Setup();
            theSystem.RegisterServices(context);

            theApplication = theSystem.Get<IApplicationUnderTest>();
            theDriver = theApplication.Navigation;
        }
Beispiel #8
0
        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));
            }));
        }
Beispiel #9
0
 Task ISubSystem.Stop()
 {
     return(Task.Factory.StartNew(() =>
     {
         if (_runtime != null)
         {
             _runtime.SafeDispose();
             _runtime = null;
         }
         if (_application != null)
         {
             _application.Teardown();
             _application = null;
         }
         if (_hosting != null)
         {
             _hosting.Shutdown();
             _hosting = null;
         }
     }));
 }
Beispiel #10
0
 public FubuMvcContext(IApplicationUnderTest application, BindingRegistry binding)
 {
     _application = application;
     _binding = binding;
 }
Beispiel #11
0
 protected virtual void configureApplication(IApplicationUnderTest application, BindingRegistry binding)
 {
 }
 protected virtual void beforeExecutingTest(IApplicationUnderTest application)
 {
 }
Beispiel #13
0
 public NavigationDriver(IApplicationUnderTest application)
 {
     _application = application;
 }
Beispiel #14
0
        public override sealed void SetUp()
        {
            _application = Context.Service <IApplicationUnderTest>();

            beforeRunning();
        }
Beispiel #15
0
 protected override void configureApplication(IApplicationUnderTest application, BindingRegistry binding)
 {
     WebDriverSettings.Current.Browser = BrowserType.Chrome;
 }
Beispiel #16
0
 public FubuMvcContext(IApplicationUnderTest application)
 {
     _application = application;
 }
Beispiel #17
0
        public override sealed void SetUp(ITestContext context)
        {
            _application = context.Retrieve<IApplicationUnderTest>();

            beforeRunning();
        }
Beispiel #18
0
 protected virtual void configureApplication(IApplicationUnderTest application, BindingRegistry binding)
 {
 }
Beispiel #19
0
        public override sealed void SetUp(ITestContext context)
        {
            _application = context.Retrieve <IApplicationUnderTest>();

            beforeRunning();
        }
Beispiel #20
0
 public ApplicationDriver(IApplicationUnderTest application)
 {
     _application = application;
 }