Exemplo n.º 1
0
        public TestCaseElement(MonoTestCase testCase, TouchRunner runner)
            : base(runner)
        {
            TestCase = testCase;
            Caption = testCase.DisplayName;
            Value = "NotExecuted";
            Tapped += async delegate
            {
               await Run();

                if (TestCase.Result == TestState.Failed)
                {
                    var root = new RootElement("Results")
                    {
                        new Section()
                        {
                            new TestResultElement(TestCase.TestResult)
                        }
                    };
                    var dvc = new DialogViewController(root, true)
                    {
                        Autorotate = true
                    };
                    Runner.NavigationController.PushViewController(dvc, true);
                }
            };

            testCase.TestCaseUpdated += OnTestCaseUpdated;
        }
Exemplo n.º 2
0
        public TestCaseElement(MonoTestCase testCase, AndroidRunner runner)
            : base(runner)
        {
            if (testCase == null) throw new ArgumentNullException("testCase");

            TestCase = testCase;

            MonoTestResult result;
            Runner.Results.TryGetValue(testCase.UniqueName, out result);
            
            if (testCase.Result == TestState.NotRun)
                Indicator = "..."; // hint there's more

            Refresh();

            testCase.TestCaseUpdated += OnTestCaseUpdated;
        }