public MainPage() { InitializeComponent(); // Windows Universal will not load all tests within the current project, // you must do it explicitly below var nunit = new global::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 global::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(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); // This will load all tests within the current project var nunit = new global::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); }