当前位置: 首页>>代码示例>>C#>>正文


C# TouchRunner.GetViewController方法代码示例

本文整理汇总了C#中MonoTouch.NUnit.UI.TouchRunner.GetViewController方法的典型用法代码示例。如果您正苦于以下问题:C# TouchRunner.GetViewController方法的具体用法?C# TouchRunner.GetViewController怎么用?C# TouchRunner.GetViewController使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MonoTouch.NUnit.UI.TouchRunner的用法示例。


在下文中一共展示了TouchRunner.GetViewController方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FinishedLaunching

		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;
		}
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:30,代码来源:AppDelegate.cs

示例2: FinishedLaunching

		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
#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;
		}
开发者ID:couchbasedeps,项目名称:Touch.Unit,代码行数:26,代码来源:AppDelegate.cs

示例3: FinishedLaunching

        //
        // 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;
        }
开发者ID:cloudmine,项目名称:CloudMineSDK-CSharp,代码行数:32,代码来源:UnitTestAppDelegate.cs

示例4: FinishedLaunching

		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
			global::Xamarin.Forms.Forms.Init();

			window = new UIWindow(UIScreen.MainScreen.Bounds);
			runner = new TouchRunner(window);
			runner.Add(System.Reflection.Assembly.GetExecutingAssembly());
			// runner.AutoStart = true;

			try
			{
				runner.Writer = new NUnitOutputTextWriter(
					runner,
					new TcpTextWriter("hostname", 16384),
					new NUnitLite.Runner.NUnit2XmlOutputWriter(DateTime.Now));
				
			}
			catch (Exception)
			{
				Console.WriteLine("Cannot set NUNit Runner Writer");
			}
			runner.TerminateAfterExecution = true;

			window.RootViewController = new UINavigationController(runner.GetViewController());
			window.MakeKeyAndVisible();
			return true;
		}
开发者ID:JudoPay,项目名称:Judo-Xamarin,代码行数:27,代码来源:UnitTestAppDelegate.cs

示例5: FinishedLaunching

 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;
 }
开发者ID:amnextking,项目名称:monotouch-bindings,代码行数:9,代码来源:UnitTestAppDelegate.cs

示例6: FinishedLaunching

        //
        // 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;
        }
开发者ID:Qwin,项目名称:SimplyMobile,代码行数:60,代码来源:UnitTestAppDelegate.cs

示例7: FinishedLaunching

        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;
        }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:13,代码来源:NUnitLiteLauncher.iPhone.cs

示例8: FinishedLaunching

        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;
        }
开发者ID:asfungithub,项目名称:sysdrawing-coregraphics,代码行数:14,代码来源:AppDelegate.cs

示例9: FinishedLaunching

		//
		// 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)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);
		
			runner = new TouchRunner (window);
			runner.Add (AsyncTestLoader.Load (GetType ().Assembly));
			
			UIApplication.CheckForIllegalCrossThreadCalls = false;
			
			window.RootViewController = new UINavigationController (runner.GetViewController ());
			window.MakeKeyAndVisible ();
			
			return true;
		}
开发者ID:rolfbjarne,项目名称:Mono.Tests,代码行数:21,代码来源:AppDelegate.cs

示例10: FinishedLaunching

        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;
        }
开发者ID:NulledLabs,项目名称:mvvmlight,代码行数:15,代码来源:AppDelegate.cs

示例11: FinishedLaunching

		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;
		}
开发者ID:jorik041,项目名称:Touch.Unit,代码行数:15,代码来源:AppDelegate.cs

示例12: FinishedLaunching

		//
		// 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;
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:23,代码来源:UnitTestAppDelegate.cs

示例13: FinishedLaunching

        //
        // 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();

            return true;
        }
开发者ID:williamsrz,项目名称:MonkeyArms,代码行数:23,代码来源:UnitTestAppDelegate.cs

示例14: FinishedLaunching

        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;
        }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:16,代码来源:AppDelegate.cs

示例15: FinishedLaunching

        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;
        }
开发者ID:mganss,项目名称:MicroJson,代码行数:19,代码来源:AppDelegate.cs


注:本文中的MonoTouch.NUnit.UI.TouchRunner.GetViewController方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。