Ejemplo n.º 1
0
        public static void OnAssertInconclusive(string message)
        {
            var handler = OnAssertCompleted;

            if (handler != null)
            {
                handler(null, new AssertCompletedEventArgs(TestResult.Inconclusive(message)));
            }
        }
Ejemplo n.º 2
0
        public TestResult Run()
        {
            TestResult result;
            var        duration = new TimeSpan();

            try
            {
                AssertHandler.OnAssertCompleted += HandleAssertCompleted;
                duration = _hostApp.TimedMethodCall(_projectName, _moduleName, _methodName);
                AssertHandler.OnAssertCompleted -= HandleAssertCompleted;

                result = EvaluateResults();
            }
            catch (Exception exception)
            {
                result = TestResult.Inconclusive("Test raised an error. " + exception.Message);
            }

            return(new TestResult(result, duration.Milliseconds));
        }
Ejemplo n.º 3
0
        public TestResult Run()
        {
            _assertResults.Clear(); //clear previous results to account for changes being made

            TestResult result;
            var        duration = new TimeSpan();

            try
            {
                AssertHandler.OnAssertCompleted += HandleAssertCompleted;
                duration = _hostApp.TimedMethodCall(_qualifiedMemberName);
                AssertHandler.OnAssertCompleted -= HandleAssertCompleted;

                result = EvaluateResults();
            }
            catch (Exception exception)
            {
                result = TestResult.Inconclusive("Test raised an error. " + exception.Message);
            }

            return(new TestResult(result, duration.Milliseconds));
        }