예제 #1
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)
        {
            global::Xamarin.Forms.Forms.Init();

            // This will load all tests within the current project
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly
            nunit.AddTestAssembly(typeof(KubeMob.Common.UnitTests.ExampleTests).Assembly);

            // Available options for testing
            nunit.Options = new TestOptions
            {
                // If True, the tests will run automatically when the app starts
                // otherwise you must run them manually.
                AutoRun = true,

                // If True, the application will terminate automatically after running the tests.
                //TerminateAfterExecution = true,

                // Information about the tcp listener host and port.
                // For now, send result as XML to the listening server.
                //TcpWriterParameters = new TcpWriterInfo("192.168.0.108", 13000),

                // Creates a NUnit Xml result file on the host file system using PCLStorage library.
                CreateXmlResultFile = true,

                // Choose a different path for the xml result file (ios file share / library directory)
                ResultFilePath = Path.Combine(NSFileManager.DefaultManager.GetUrls(NSSearchPathDirectory.LibraryDirectory, NSSearchPathDomain.User)[0].Path, "Results.xml")
            };

            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            Android.Util.Log.WriteLine(LogPriority.Debug, "", $"OnCreate(savedInstanceState={savedInstanceState}) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); //!!!

            base.OnCreate(savedInstanceState);

            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // This will load all tests within the current project
            var nunit = new NUnit.Runner.App();

            //// If you want to add tests in another assembly
            nunit.AddTestAssembly(typeof(SampleUnitTest).Assembly);

            // Do you want to automatically run tests when the app starts?
            nunit.Options = new TestOptions();
#if !DEBUG
            nunit.Options = new TestOptions {
                AutoRun = true, TcpWriterParamaters = new TcpWriterInfo("10.0.2.2", 13000)
            };
#endif
            LoadApplication(nunit);

            var context = TestContext.CurrentContext;
        }
예제 #3
0
        public MainPage()
        {
            InitializeComponent();

            // Windows Universal will not load all tests within the current project,
            // you must do it explicitly below
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly, add a reference and
            // duplicate the following line with a type from the referenced assembly
            nunit.AddTestAssembly(typeof(MainPage).GetTypeInfo().Assembly);

            // Available options for testing
            nunit.Options = new TestOptions
            {
                // If True, the tests will run automatically when the app starts
                // otherwise you must run them manually.
                AutoRun = true,

                // Information about the tcp listener host and port.
                // For now, send result as XML to the listening server.
                // NOTE: Your UWP App must have Private Networks capability enabled
                //TcpWriterParameters = new TcpWriterInfo("192.168.0.108", 13000),

                // Creates a NUnit Xml result file on the host file system using PCLStorage library.
                CreateXmlResultFile = false
            };

            LoadApplication(nunit);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // This will load all tests within the current project
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly
            //nunit.AddTestAssembly(typeof(MyTests).Assembly);
            nunit.AddTestAssembly(typeof(UnitTests.TestClass).Assembly);
            nunit.AddTestAssembly(typeof(UnitTests.Models.CharacterUnitTests).Assembly);
            nunit.AddTestAssembly(typeof(UnitTests.GameEngine.HelperEngineUnitTests).Assembly);

            // Available options for testing
            nunit.Options = new TestOptions
            {
                // If True, the tests will run automatically when the app starts
                // otherwise you must run them manually.
                AutoRun = true,

                // If True, the application will terminate automatically after running the tests.
                //TerminateAfterExecution = true,

                // Information about the tcp listener host and port.
                // For now, send result as XML to the listening server.
                //TcpWriterParameters = new TcpWriterInfo("192.168.0.108", 13000),

                // Creates a NUnit Xml result file on the host file system using PCLStorage library.
                // CreateXmlResultFile = true,

                // Choose a different path for the xml result file
                // ResultFilePath = Path.Combine(Environment.ExternalStorageDirectory.Path, Environment.DirectoryDownloads, "Nunit", "Results.xml")
            };

            LoadApplication(nunit);
        }
예제 #5
0
        public MainPage()
        {
            InitializeComponent();

            // Windows Universal will not load all tests within the current project,
            // you must do it explicitly below
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly, add a reference and
            // duplicate the following line with a type from the referenced assembly
            nunit.AddTestAssembly(typeof(MainPage).GetTypeInfo().Assembly);

            LoadApplication(nunit);
        }
예제 #6
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            var nunit = new NUnit.Runner.App();

            nunit.AddTestAssembly(typeof(System.Data.SQLite.Tests.PlatformTests).Assembly);
            nunit.Options = new TestOptions {
                AutoRun = true
            };
            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
예제 #7
0
        public MainPage()
        {
            InitializeComponent();

            var nunit = new NUnit.Runner.App();

            nunit.AddTestAssembly(typeof(TestHelpers).Assembly);

            nunit.Options = new TestOptions
            {
                LogToOutput = true
            };

            LoadApplication(nunit);
        }
예제 #8
0
        public UnitTestsPage()
        {
            this.InitializeComponent();

            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly, add a reference and
            // duplicate the following line with a type from the referenced assembly
            nunit.AddTestAssembly(typeof(UnitTestsPage).GetTypeInfo().Assembly);

            // Do you want to automatically run tests when the app starts?
            nunit.AutoRun = true;

            LoadApplication(nunit);
        }
예제 #9
0
        public MainPage()
        {
            InitializeComponent();

            // Windows Universal will not load all tests within the current project,
            // you must do it explicitly below
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly, add a reference and
            // duplicate the following line with a type from the referenced assembly
            nunit.AddTestAssembly(typeof(MainPage).GetTypeInfo().Assembly);

            // Do you want to automatically run tests when the app starts?
            nunit.AutoRun = true;

            LoadApplication(nunit);
        }
		//
		// 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)
		{
			global::Xamarin.Forms.Forms.Init();            

			// This will load all tests within the current project
			var nunit = new NUnit.Runner.App();

			// If you want to add tests in another assembly
			nunit.AddTestAssembly(typeof(DownloadManager.Test.DownloadTest).Assembly);

			// Do you want to automatically run tests when the app starts?
			nunit.AutoRun = false;

			LoadApplication(nunit);

			return base.FinishedLaunching(app, options);
		}
예제 #11
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)
        {
            global::Xamarin.Forms.Forms.Init();

            // This will load all tests within the current project
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly
            nunit.AddTestAssembly(typeof(SimpleIoC.CrossTests.DiContainerTests).Assembly);

            // Do you want to automatically run tests when the app starts?
            nunit.AutoRun = true;

            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
예제 #12
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // This will load all tests within the current project
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly
            nunit.AddTestAssembly(typeof(SimpleIoC.CrossTests.DiContainerTests).Assembly);

            // Do you want to automatically run tests when the app starts?
            nunit.AutoRun = true;

            LoadApplication(nunit);
        }
예제 #13
0
        public MainPage()
        {
            InitializeComponent();

            // Windows Universal will not load all tests within the current project,
            // you must do it explicitly below
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly, add a reference and
            // duplicate the following line with a type from the referenced assembly
            //nunit.AddTestAssembly(typeof(MainPage).GetTypeInfo().Assembly);
            // Or, if you want to add tests with an extra test options dictionary
            var parameters = new Dictionary <string, string> {
                { "Parameter", "Value" }
            };

            nunit.AddTestAssembly(typeof(MainPage).GetTypeInfo().Assembly,
                                  new Dictionary <string, object> {
                { FrameworkPackageSettings.TestParametersDictionary, parameters }
            });

            // Available options for testing
            nunit.Options = new TestOptions
            {
                // If True, the tests will run automatically when the app starts
                // otherwise you must run them manually.
                AutoRun = true,

                // If True, the application will terminate automatically after running the tests.
                //TerminateAfterExecution = true,

                // Information about the tcp listener host and port.
                // For now, send result as XML to the listening server.
                // NOTE: Your UWP App must have Private Networks capability enabled
                //TcpWriterParameters = new TcpWriterInfo("192.168.0.108", 13000),

                // Creates a NUnit Xml result file on the host file system using PCLStorage library.
                CreateXmlResultFile = false,

                // Choose a different path for the xml result file
                // ResultFilePath = System.IO.Path.Combine(Windows.Storage.ApplicationData.Current.TemporaryFolder.Path, "Nunit", "Results.xml")
            };

            LoadApplication(nunit);
        }
예제 #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            var nunit = new NUnit.Runner.App();

            nunit.AddTestAssembly(typeof(System.Data.SQLite.Tests.PlatformTests).Assembly);
            nunit.Options = new TestOptions {
                AutoRun = true
            };
            LoadApplication(nunit);
        }
예제 #15
0
        public MainPage()
        {
            InitializeComponent();

            // Windows Phone will not load all tests within the current project,
            // you must do it explicitly below
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly, add a reference and
            // duplicate the following line with a type from the referenced assembly
            nunit.AddTestAssembly(typeof(SimpleIoC.CrossTests.DiContainerTests).GetTypeInfo().Assembly);

            // Do you want to automatically run tests when the app starts?
            //nunit.AutoRun = true;

            LoadApplication(nunit);

            this.NavigationCacheMode = NavigationCacheMode.Required;
        }
예제 #16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // This will load all tests within the current project
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly
            nunit.AddTestAssembly(typeof(Canary).Assembly);

            // Do you want to automatically run tests when the app starts?
            nunit.Options = new TestOptions
            {
                AutoRun = true
            };

            LoadApplication(nunit);
        }
        protected override void OnCreate()
        {
            base.OnCreate();

            NUnitLogs.LogMessage($"***********OnCreateMobile***********");

            // Tizen will not load all tests within the current project,
            // you must do it explicitly below
            var nunit = new NUnit.Runner.App();

            // If you want to add tests in another assembly, add a reference and
            // duplicate the following line with a type from the referenced assembly
            //nunit.AddTestAssembly(typeof(MainPage).GetTypeInfo().Assembly);
            //nunit.AddTestAssembly(typeof(Program).GetTypeInfo().Assembly);
            nunit.AddTestAssembly(typeof(TestClass1).GetTypeInfo().Assembly);

            // Available options for testing
            nunit.Options = new TestOptions
            {
                // If True, the tests will run automatically when the app starts
                // otherwise you must run them manually.
                AutoRun = true,

                // If True, the application will terminate automatically after running the tests.
                //TerminateAfterExecution = true,

                // Information about the tcp listener host and port.
                // For now, send result as XML to the listening server.
                // NOTE: Your UWP App must have Private Networks capability enabled
                //TcpWriterParameters = new TcpWriterInfo("192.168.0.108", 13000),

                // Creates a NUnit Xml result file on the host file system using PCLStorage library.
                CreateXmlResultFile = true,

                // Choose a different path for the xml result file
                // ResultFilePath = System.IO.Path.Combine(Windows.Storage.ApplicationData.Current.TemporaryFolder.Path, "Nunit", "Results.xml")
                //ResultFilePath = Application.Current.DirectoryInfo.Data + "Results.xml"
            };

            LoadApplication(nunit);
        }