Inheritance: ITestListener
Example #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById<Button>(Resource.Id.MyButton);
            //button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
            button.Click += OnClick;
            var txtBox = FindViewById<TextView>(Resource.Id.TestOutput);

            txtBox.Text = "Executing tests...";
            try
            {
                runner = new AndroidRunner(txtBox, RunOnUiThread);
                runner.ExecuteAllTestsAsync();
            }
            catch(Exception e)
            {
                txtBox.Text = e.ToString();
            }
        }
Example #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById<Button>(Resource.Id.MyButton);
            //button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
            button.Click += OnClick;
            var txtBox = FindViewById<TextView>(Resource.Id.TestOutput);
            txtBox.MovementMethod = new ScrollingMovementMethod();

            var stream = Assets.Open(CredentialsAsset);
            txtBox.Text = "Executing tests...";
            runner = new AndroidRunner(stream, txtBox, RunOnUiThread);
            runner.ExecuteAllTestsAsync();
        }
Example #3
0
 private static SpecificTestsFilter Create_Categories(TestRunner runner, ICollection<string> categories, bool isRunOnly)
 {
     return new SpecificTestsFilter(runner)
     {
         _categories = categories ?? new HashSet<string>(),
         _isRunOnly = isRunOnly
     };
 }
Example #4
0
 private static SpecificTestsFilter Create_Tests(TestRunner runner, ICollection<string> tests, bool isRunOnly)
 {
     return new SpecificTestsFilter(runner)
     {
         _tests = tests ?? new HashSet<string>(),
         _isRunOnly = isRunOnly
     };
 }
Example #5
0
 public static SpecificTestsFilter RunAllCategoriesExcept(TestRunner runner, ICollection<string> categoriesToSkip)
 {
     return Create_Categories(runner, categoriesToSkip, isRunOnly: false);
 }
Example #6
0
 public static SpecificTestsFilter RunOnlyCategories(TestRunner runner, ICollection<string> categoriesToRun)
 {
     return Create_Categories(runner, categoriesToRun, isRunOnly: true);
 }
Example #7
0
 public static SpecificTestsFilter RunAllTestsExcept(TestRunner runner, ICollection<string> testsToSkip)
 {
     return Create_Tests(runner, testsToSkip, isRunOnly: false);
 }
Example #8
0
 public static SpecificTestsFilter RunOnlyTests(TestRunner runner, ICollection<string> testsToRun)
 {
     return Create_Tests(runner, testsToRun, isRunOnly: true);
 }
Example #9
0
 private SpecificTestsFilter(TestRunner runner)
 {
     _runner = runner;
 }
Example #10
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     this.TestRunner = new WindowsAppRunner(dispatcher, this.textBox);
 }
Example #11
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     this._runner = new WindowsAppRunner(dispatcher, this.textBox);
     this._runner.ExecuteAllTestsAsync();
 }