Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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();
            Xamarin.Calabash.Start();

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

            // 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 = false
            };

            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 3
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
            {
                Options = new TestOptions
                {
                    AutoRun             = true,
                    CreateXmlResultFile = true
                }
            };

            var storageFilepath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);

            Microsoft.MobCAT.Repository.Test.Bootstrap.BeginWithDatastore((datastoreName) => new SQLiteNetSampleRepositoryContext(Guard.NullOrWhitespace(storageFilepath), datastoreName));

            LoadApplication(nunit);
        }
Ejemplo n.º 4
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(MyTests).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.
                //TcpWriterParameters = new TcpWriterInfo("192.168.0.108", 13000),

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

            LoadApplication(nunit);
        }
Ejemplo n.º 5
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;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// OnCreate
        /// </summary>
        /// <param name="savedInstanceState">saveInstanceState</param>
        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);

            // 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")
            };

            this.LoadApplication(nunit);
        }
Ejemplo n.º 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)
        {
            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(MyTests).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));
        }
Ejemplo n.º 8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            var app = new NUnit.Runner.App();
            LoadApplication(app);
        }
Ejemplo n.º 9
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            var app = new NUnit.Runner.App();

            LoadApplication(app);
        }
Ejemplo n.º 10
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));
        }
Ejemplo n.º 11
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);
        }
Ejemplo n.º 12
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)
        {
            Xamarin.Calabash.Start();

            Xamarin.Forms.Forms.Init();

            SetUp.SetUpFixture.SetUp();

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

            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 13
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);
        }
Ejemplo n.º 14
0
        public MainPage()
        {
            InitializeComponent();

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

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

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

            LoadApplication(nunit);
        }
Ejemplo n.º 15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            SetUp.SetUpFixture.SetUp();

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

            LoadApplication(nunit);
        }
Ejemplo n.º 16
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(MyTests).Assembly);

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

            LoadApplication(nunit);

            return base.FinishedLaunching(app, options);
        }
Ejemplo n.º 17
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(MyTests).Assembly);

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

            LoadApplication(nunit);
        }
Ejemplo n.º 18
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            NUnit.Runner.App nunit = new NUnit.Runner.App
            {
                Options = new TestOptions
                {
                    AutoRun             = true,
                    CreateXmlResultFile = true
                }
            };

            LoadApplication(nunit);
        }
Ejemplo n.º 19
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();

            var nunit = new NUnit.Runner.App
            {
                Options = new TestOptions
                {
                    AutoRun             = true,
                    CreateXmlResultFile = true
                }
            };

            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 20
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(MyTests).Assembly);

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

            LoadApplication(nunit);
        }
Ejemplo n.º 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)
        {
            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(MyTests).Assembly);

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

            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 22
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);
        }
Ejemplo n.º 23
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);
        }
Ejemplo n.º 24
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);
        }
Ejemplo n.º 25
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;
        }
Ejemplo n.º 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)
        {
            global::Xamarin.Forms.Forms.Init();

            SetUp.SetUpFixture.SetUp();

            // This will load all tests within the current project
            var nunit = new NUnit.Runner.App {
                AutoRun = false
            };

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


            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 27
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();

            var nunit = new NUnit.Runner.App
            {
                Options = new TestOptions
                {
                    AutoRun             = true,
                    CreateXmlResultFile = true
                }
            };

            Microsoft.MobCAT.Repository.Test.Bootstrap.Begin(() => new InMemorySampleRepositoryContext());

            LoadApplication(nunit);

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Ejemplo n.º 28
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)
        {
            Forms.Init();

            // Register the notification dependency.  Don't forget to do this.
            DependencyService.Register <Notifications.iOS.NotificationScheduler>();

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

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

            LoadApplication(nunit);

            return(base.FinishedLaunching(app, options));
        }
        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);
        }
Ejemplo n.º 30
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();

            var nunit = new NUnit.Runner.App
            {
                Options = new TestOptions
                {
                    AutoRun             = true,
                    CreateXmlResultFile = true
                }
            };

            var storageFilepath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "..", "Library");

            Microsoft.MobCAT.Repository.Test.Bootstrap.BeginWithDatastore((datastoreName) => new EFCoreSampleRepositoryContext(Guard.NullOrWhitespace(storageFilepath), datastoreName));

            LoadApplication(nunit);

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Ejemplo n.º 31
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
            {
                Options = new TestOptions
                {
                    AutoRun             = true,
                    CreateXmlResultFile = true
                }
            };

            LoadApplication(nunit);
        }
Ejemplo n.º 32
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
            {
                Options = new TestOptions
                {
                    AutoRun             = true,
                    CreateXmlResultFile = true
                }
            };

            Microsoft.MobCAT.Repository.Test.Bootstrap.Begin(() => new InMemorySampleRepositoryContext());

            LoadApplication(nunit);
        }
Ejemplo n.º 33
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            // register every tests included in the main application/assembly
            var nunit = new NUnit.Runner.App();

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

            var storageFilepath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);

            TestBootstrap.Begin((datastoreName) => new EFCoreSampleRepositoryContext(Guard.NullOrWhitespace(storageFilepath), datastoreName));

            // Load the Xamarin.Forms based application
            LoadApplication(nunit);
        }
Ejemplo n.º 34
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();
            Xamarin.Calabash.Start();

            // register every tests included in the main application/assembly
            var nunit = new NUnit.Runner.App();

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

            var storageFilepath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "..", "Library");

            TestBootstrap.Begin((datastoreName) => new EFCoreSampleRepositoryContext(Guard.NullOrWhitespace(storageFilepath), datastoreName));

            // Load the Xamarin.Forms based application
            LoadApplication(nunit);

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