Example #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var optionString = Intent.GetStringExtra("XAMARIN_ASYNCTESTS_OPTIONS");

            if (string.IsNullOrEmpty(optionString))
            {
                optionString = "--category=Global";
            }

            Forms.Init(this, bundle);

            var setup = new MonoConnectionFrameworkSetup("Xamarin.WebTests.Android");

            DependencyInjector.RegisterDependency <IConnectionFrameworkSetup> (() => setup);
            DependencyInjector.RegisterDependency <IMonoConnectionFrameworkSetup> (() => setup);

            DependencyInjector.RegisterAssembly(typeof(WebDependencyProvider).Assembly);
            DependencyInjector.RegisterAssembly(typeof(MainActivity).Assembly);

            var options = new MobileTestOptions(optionString);

            Framework = TestFramework.GetLocalFramework(options.PackageName, typeof(MainActivity).Assembly);

            var mobileTestApp = new MobileFormsTestApp(Framework, options);

            // mobileTestApp.App.FinishedEvent += (sender, e) => TerminateWithSuccess ();

            LoadApplication(mobileTestApp);
        }
Example #2
0
        public override void DidFinishLaunching(NSNotification notification)
        {
            ui = new MacUI();

            isStopped = true;
            ui.TestRunner.Stop.NotifyStateChanged.StateChanged     += (sender, e) => IsStopped = !e;
            ui.ServerManager.Start.NotifyStateChanged.StateChanged += (sender, e) => HasServer = !e;
            IsStopped = true;

            settingsDialogController = new SettingsDialogController();

            mainWindowController = new MainWindowController();
            mainWindowController.Window.MakeKeyAndOrderFront(this);

            ui.ServerManager.TestSession.PropertyChanged += (sender, e) => {
                currentSession = e;
                if (SessionChangedEvent != null)
                {
                    SessionChangedEvent(this, e);
                }
            };

            options = new MobileTestOptions(Environment.GetEnvironmentVariable("XAMARIN_ASYNCTESTS_OPTIONS"));

            StartWithOptions();

            settingsDialogController.DidFinishLaunching();
        }
Example #3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary dict)
        {
            Forms.Init();

            var setup = new MonoConnectionFrameworkSetup("Xamarin.WebTests.iOS");

            DependencyInjector.RegisterDependency <IConnectionFrameworkSetup> (() => setup);
            DependencyInjector.RegisterDependency <IMonoConnectionFrameworkSetup> (() => setup);

            DependencyInjector.RegisterAssembly(typeof(WebDependencyProvider).Assembly);
            DependencyInjector.RegisterAssembly(typeof(AppDelegate).Assembly);

            var options = new MobileTestOptions(Environment.GetEnvironmentVariable("XAMARIN_ASYNCTESTS_OPTIONS"));

            Framework = TestFramework.GetLocalFramework(options.PackageName, typeof(AppDelegate).Assembly);

            var mobileTestApp = new MobileFormsTestApp(Framework, options);

            mobileTestApp.App.FinishedEvent += (sender, e) => TerminateWithSuccess();

            LoadApplication(mobileTestApp);

            return(base.FinishedLaunching(app, dict));
        }