예제 #1
0
        public TestCaseElement(MonoTestCase testCase, TouchRunner runner)
            : base(runner)
        {
            TestCase = testCase;
            Caption = testCase.DisplayName;
            Value = "NotExecuted";
            Tapped += async delegate
            {
               await Run();

                if (TestCase.Result == TestState.Failed)
                {
                    var root = new RootElement("Results")
                    {
                        new Section()
                        {
                            new TestResultElement(TestCase.TestResult)
                        }
                    };
                    var dvc = new DialogViewController(root, true)
                    {
                        Autorotate = true
                    };
                    Runner.NavigationController.PushViewController(dvc, true);
                }
            };

            testCase.TestCaseUpdated += OnTestCaseUpdated;
        }
예제 #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
            // otherwise you need to ensure that the test assemblies will
            // become part of the app bundle
            runner.Add(typeof(PubnubMessaging.Tests.UnitTestAppDelegate).Assembly);
            // you can use the default or set your own custom writer (e.g. save to web site and tweet it ;-)

            //TODO:change before going live
            //string ip = System.Net.IPAddress.Any.ToString();
            runner.Writer = new TcpTextWriter("10.96.97.4", 16384);

            // start running the test suites as soon as the application is loaded
            runner.AutoStart = true;
            // crash the application (to ensure it's ended) and return to springboard
            //runner.TerminateAfterExecution = true;
            // you can get NUnit[2-3]-style XML reports to the console or server like this
            // replace `null` (default to Console.Out) to a TcpTextWriter to send data to a socket server
            // replace `NUnit2XmlOutputWriter` with `NUnit3XmlOutputWriter` for NUnit3 format
            //runner.Writer = new NUnitOutputTextWriter (runner, null, new NUnitLite.Runner.NUnit2XmlOutputWriter ());
            // the same AutoStart and TerminateAfterExecution can be used for build automation

            window.RootViewController = new UINavigationController(runner.GetViewController());
            window.MakeKeyAndVisible();
            return(true);
        }
예제 #3
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);

#warning !!!!ignoring ssl certification!!!!
            //ignoring ssl certification to test https request
            ServicePointManager
            .ServerCertificateValidationCallback +=
                (sender, cert, chain, sslPolicyErrors) => true;

            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            //prevent device from sleep mode
            UIApplication.SharedApplication.IdleTimerDisabled = true;

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow((RectangleF)UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
            // otherwise you need to ensure that the test assemblies will
            // become part of the app bundle
            runner.Add(Assembly.GetExecutingAssembly());
#if true
            // you can use the default or set your own custom writer (e.g. save to web site and tweet it ;-)
            runner.Writer = new TcpTextWriter("192.168.2.83", 8888);
            // start running the test suites as soon as the application is loaded
            runner.AutoStart = true;
            // crash the application (to ensure it's ended) and return to springboard
            runner.TerminateAfterExecution = true;
#endif
#if false
            // you can get NUnit[2-3]-style XML reports to the console or server like this
            // replace `null` (default to Console.Out) to a TcpTextWriter to send data to a socket server
            // replace `NUnit2XmlOutputWriter` with `NUnit3XmlOutputWriter` for NUnit3 format
            runner.Writer = new NUnitOutputTextWriter(runner, null, new NUnitLite.Runner.NUnit2XmlOutputWriter());
            // the same AutoStart and TerminateAfterExecution can be used for build automation
#endif
            window.RootViewController = new UINavigationController(runner.GetViewController());
            window.MakeKeyAndVisible();
            return(true);
        }
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            UINavigationController navController = new UINavigationController(runner.GetViewController());

            navController.NavigationBar.BarTintColor        = UIColor.FromRGB(0 / 255.0f, 145 / 255.0f, 211 / 255.0f);
            navController.NavigationBar.TintColor           = UIColor.White;
            navController.NavigationBar.TitleTextAttributes = new UIStringAttributes()
            {
                ForegroundColor = UIColor.White,
            };

            window.RootViewController = navController;

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #6
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // We need this to ensure the execution assembly is part of the app bundle
            runner.AddExecutionAssembly(typeof(ExtensibilityPointFactory).Assembly);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
            // otherwise you need to ensure that the test assemblies will
            // become part of the app bundle
            //     runner.Add(typeof(MonoTouchFixtures.Test.Test).Assembly);
#if false
            // you can use the default or set your own custom writer (e.g. save to web site and tweet it ;-)
            runner.Writer = new TcpTextWriter("10.0.1.2", 16384);
            // start running the test suites as soon as the application is loaded
            runner.AutoStart = true;
            // crash the application (to ensure it's ended) and return to springboard
            runner.TerminateAfterExecution = true;
#endif

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #7
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Console.SetOut(_logSaver);
            SetUpFixture.SetUp();

            // create a new window instance based on the screen size
            _window = new UIWindow(UIScreen.MainScreen.Bounds);
            _runner = new NonterminatingTouchRunner(_window, _logSaver);

            // register every tests included in the main application/assembly
            _runner.Add(System.Reflection.Assembly.GetExecutingAssembly());
            _runner.AutoStart = true;
            _runner.TerminateAfterExecution = true;

            _window.RootViewController = new UINavigationController(_runner.GetViewController());

            // make the window visible
            _window.MakeKeyAndVisible();

            #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            #endif

            return(true);
        }
예제 #8
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            // setup for all tests
            CountdownEvent latch = new CountdownEvent(1);

            ACPCore.LogLevel = ACPMobileLogLevel.Verbose;
            ACPAnalytics.RegisterExtension();
            ACPIdentity.RegisterExtension();
            ACPLifecycle.RegisterExtension();

            // start core
            ACPCore.Start(() =>
            {
                ACPCore.ConfigureWithAppID("94f571f308d5/00fc543a60e1/launch-c861fab912f7-development");
                latch.Signal();
            });
            latch.Wait();
            latch.Dispose();

            return(true);
        }
예제 #9
0
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UnhandledExceptionWatcher.OnError += exn =>
            {
                Assert.Fail("Unhandled exception in event handler: " + exn.Message);
            };

            DefaultLoggers.Dispatcher.SetLevel(Logger.LogLevel.Verbose);
            DefaultLoggers.Serialization.SetLevel(Logger.LogLevel.Verbose);
            DefaultLoggers.Connection.SetLevel(Logger.LogLevel.Verbose);
            DefaultLoggers.Client.SetLevel(Logger.LogLevel.Verbose);
            DefaultLoggers.ClientRtm.SetLevel(Logger.LogLevel.Verbose);
            DefaultLoggers.ClientRtmSubscription.SetLevel(Logger.LogLevel.Verbose);

            // create a new window instance based on the screen size
            _window = new UIWindow(UIScreen.MainScreen.Bounds);
            _runner = new TouchRunner(_window);

            // register every tests included in the main application/assembly
            _runner.Add(Assembly.GetExecutingAssembly());

            _window.RootViewController = new UINavigationController(_runner.GetViewController());

            // make the window visible
            _window.MakeKeyAndVisible();

            return(true);
        }
예제 #10
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this 
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // We need this to ensure the execution assembly is part of the app bundle
            runner.AddExecutionAssembly(typeof(ExtensibilityPointFactory).Assembly);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
            // otherwise you need to ensure that the test assemblies will 
            // become part of the app bundle
            //     runner.Add(typeof(MonoTouchFixtures.Test.Test).Assembly);
#if false
            // you can use the default or set your own custom writer (e.g. save to web site and tweet it ;-)
            runner.Writer = new TcpTextWriter ("10.0.1.2", 16384);
            // start running the test suites as soon as the application is loaded
            runner.AutoStart = true;
            // crash the application (to ensure it's ended) and return to springboard
            runner.TerminateAfterExecution = true;
#endif

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return true;
        }
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            app.IdleTimerDisabled = true;

            // create a new window instance based on the screen size
            this.window = new UIWindow(UIScreen.MainScreen.Bounds);
            this.runner = new TouchRunner(this.window);

      #if !DEBUG
            this.ConfigureRunnerForCI();
      #endif

            app.IdleTimerDisabled = true;

            // register every tests included in the main application/assembly
            var thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
            this.runner.Add(thisAssembly);


            var viewControllerForTestRunner = this.runner.GetViewController();
            this.window.RootViewController = new UINavigationController(viewControllerForTestRunner);

            // make the window visible
            this.window.MakeKeyAndVisible();

            return(true);
        }
예제 #12
0
 public NUnitOutputTextWriter(TouchRunner runner, TextWriter baseWriter, OutputWriter xmlWriter)
 {
     Runner          = runner;
     BaseWriter      = baseWriter ?? Console.Out;
     XmlOutputWriter = xmlWriter;
     // do not send real-time test results on the writer sif XML reports are enabled
     real_time_reporting = (xmlWriter == null);
 }
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     window = new UIWindow(UIScreen.MainScreen.Bounds);
     runner = new TouchRunner(window);
     runner.Add(Assembly.GetExecutingAssembly());
     window.RootViewController = new UINavigationController(runner.GetViewController());
     window.MakeKeyAndVisible();
     return(true);
 }
예제 #14
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app,
                                               NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            var path = FileLoadTests.GetDicosPath();

            var dicos = Path.Combine(
                NSBundle.MainBundle.BundlePath,
                "dicos.json.txt");

            using (var reader = new StreamReader(dicos))
                using (var writer = new StreamWriter(path))
                {
                    writer.Write(reader.ReadToEnd());
                }

            path = FileLoadTests.GetTinyPath();

            var tiny = Path.Combine(
                NSBundle.MainBundle.BundlePath,
                "tiny.json.txt");

            using (var reader = new StreamReader(tiny))
                using (var writer = new StreamWriter(path))
                {
                    writer.Write(reader.ReadToEnd());
                }

            path = FileLoadTests.GetHighlyNestedPath();

            var nested = Path.Combine(
                NSBundle.MainBundle.BundlePath,
                "_oj-highly-nested.json.txt");

            using (var reader = new StreamReader(nested))
                using (var writer = new StreamWriter(path))
                {
                    writer.Write(reader.ReadToEnd());
                }

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #15
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            window.RootViewController = new UINavigationController(runner.GetViewController());
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #16
0
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        window = new UIWindow(UIScreen.MainScreen.Bounds);

        runner = new TouchRunner(window);
        runner.Add(System.Reflection.Assembly.GetExecutingAssembly());
        runner.Add(typeof(Xamarin.BindingTests2.BindingTest).Assembly);
        runner.Add(typeof(Xamarin.BindingTests.ProtocolTest).Assembly);

        window.RootViewController = new UINavigationController(runner.GetViewController());
        window.MakeKeyAndVisible();

        return(true);
    }
예제 #17
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);
            runner = new TouchRunner (window);

            runner.Add (System.Reflection.Assembly.GetExecutingAssembly ());

            window.RootViewController = new UINavigationController (runner.GetViewController ());

            window.MakeKeyAndVisible ();

            return true;
        }
예제 #18
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            window.RootViewController = new UINavigationController(runner.GetViewController());

            window.MakeKeyAndVisible();

            return(true);
        }
예제 #19
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Window  = new UIWindow(UIScreen.MainScreen.Bounds);
            _runner = new TouchRunner(Window);

            // register every tests included in the main application/assembly
            _runner.Add(Assembly.GetExecutingAssembly());

            Window.RootViewController = new UINavigationController(_runner.GetViewController());

            // make the window visible
            Window.MakeKeyAndVisible();

            return(true);
        }
예제 #20
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
            // otherwise you need to ensure that the test assemblies will
            // become part of the app bundle
            runner.Add(typeof(MonoTouchFixtures.RegressionTest).Assembly);

            window.RootViewController = new UINavigationController(runner.GetViewController());
            window.MakeKeyAndVisible();
            return(true);
        }
예제 #21
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(typeof(ReactiveTests.Tests.ObserverTest).Assembly);

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #22
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // Add tests.
            runner.Add(typeof(ApiExamples.ApiExampleBase).Assembly);

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #23
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
            runner.Add(typeof(BundledResources.ResourcesTest).Assembly);

            window.RootViewController = new UINavigationController(runner.GetViewController());
            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #24
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            Runner = new TouchRunner(Window);

            // tests can be inside the main assembly
            Runner.Add(Assembly.GetExecutingAssembly());

            Window.RootViewController = new UINavigationController(Runner.GetViewController());

            // make the window visible
            Window.MakeKeyAndVisible();

            return(true);
        }
예제 #25
0
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            this.window = new UIWindow(UIScreen.MainScreen.Bounds);
            this.runner = new TouchRunner(this.window);

            // register every tests included in the main application/assembly
            this.runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            this.window.RootViewController = new UINavigationController(this.runner.GetViewController());

            // make the window visible
            this.window.MakeKeyAndVisible();

            return(true);
        }
예제 #26
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window        = new UIWindow(UIScreen.MainScreen.Bounds);
            runner        = new TouchRunner(window);
            runner.Filter = new NotFilter(new CategoryExpression("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter").Filter);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #27
0
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
#if __MACCATALYST__
        // Debug spew to track down https://github.com/xamarin/maccore/issues/2414
        Console.WriteLine("AppDelegate.FinishedLaunching");
#endif
        window = new UIWindow(UIScreen.MainScreen.Bounds);

        runner = new TouchRunner(window);
        runner.Add(System.Reflection.Assembly.GetExecutingAssembly());
        runner.Add(typeof(Xamarin.BindingTests2.BindingTest).Assembly);
        runner.Add(typeof(Xamarin.BindingTests.ProtocolTest).Assembly);

        window.RootViewController = new UINavigationController(runner.GetViewController());
        window.MakeKeyAndVisible();

        return(true);
    }
예제 #28
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
#if false
            // you can use the default or set your own custom writer (e.g. save to web site and tweet it ;-)
            runner.Writer = new TcpTextWriter("10.0.1.2", 16384);
            // start running the test suites as soon as the application is loaded
            runner.AutoStart = true;
            // crash the application (to ensure it's ended) and return to springboard
            runner.TerminateAfterExecution = true;
#endif
            window.RootViewController = new UINavigationController(runner.GetViewController());
            window.MakeKeyAndVisible();
            return(true);
        }
예제 #29
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            //prevent device from sleep mode
            UIApplication.SharedApplication.IdleTimerDisabled = true;

            window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            window.MakeKeyAndVisible();

            return(true);
        }
예제 #30
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(Window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            Window.RootViewController = new UINavigationController(runner.GetViewController());

            // make the window visible
            Window.MakeKeyAndVisible();

            return(true);
        }
예제 #31
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            Gigya.InitWithAPIKey("3_Sh5iokMA9q0k5i8s5P4K3O8eYAax9Q0QPLPsXO0MRa4YXiETXRTTypmr8iYAlfRz", UIApplication.SharedApplication, new NSDictionary());

            NavigationController = new UINavigationController(runner.GetViewController());

            window.RootViewController = NavigationController;

            // make the window visible
            window.MakeKeyAndVisible();

            return(Facebook.CoreKit.ApplicationDelegate.SharedInstance.FinishedLaunching(app, options));
        }
예제 #32
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
#if __MACCATALYST__
            // Debug spew to track down https://github.com/xamarin/maccore/issues/2414
            Console.WriteLine("AppDelegate.FinishedLaunching");
#endif
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            Runner = new TouchRunner(Window);

            // tests can be inside the main assembly
            Runner.Add(Assembly.GetExecutingAssembly());

            Window.RootViewController = new UINavigationController(Runner.GetViewController());

            // make the window visible
            Window.MakeKeyAndVisible();

            return(true);
        }
예제 #33
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // tests can be inside the main assembly
            runner.Add(Assembly.GetExecutingAssembly());
            runner.Add(typeof(EmbeddedResources.ResourcesTest).Assembly);
            runner.Add(typeof(Xamarin.BindingTests.ProtocolTest).Assembly);

            window.RootViewController = new UINavigationController(runner.GetViewController());
            // make the window visible
            window.MakeKeyAndVisible();


            // required for the background tasks tests, we can only register the tasks in this method
            BGTaskSchedulerTest.RegisterTestTasks();
            return(true);
        }