Пример #1
0
        private static VSTestOutcome GetOutcome(GallioTestOutcome outcome)
        {
            if (outcome == GallioTestOutcome.Canceled)
            {
                return(VSTestOutcome.Aborted);
            }
            if (outcome == GallioTestOutcome.Error)
            {
                return(VSTestOutcome.Error);
            }
            if (outcome == GallioTestOutcome.Timeout)
            {
                return(VSTestOutcome.Timeout);
            }
            if (outcome == GallioTestOutcome.Ignored || outcome == GallioTestOutcome.Pending || outcome == GallioTestOutcome.Explicit)
            {
                return(VSTestOutcome.NotRunnable);
            }

            switch (outcome.Status)
            {
            case TestStatus.Passed:
                return(VSTestOutcome.Passed);

            case TestStatus.Inconclusive:
                return(VSTestOutcome.Inconclusive);

            case TestStatus.Skipped:
                return(VSTestOutcome.NotExecuted);

            case TestStatus.Failed:
            default:
                return(VSTestOutcome.Failed);
            }
        }
Пример #2
0
 /// <summary>
 /// Creates a test result with a particular outcome.
 /// </summary>
 /// <param name="outcome">The outcome.</param>
 public TestResult(TestOutcome outcome)
 {
     Outcome = outcome;
 }
 void UpdateGallioTestOutcome(Model.TestOutcome testOutcome)
 {
     testStepEventArgs.TestStepRun.Result.Outcome = testOutcome;
 }
        private static VSTestOutcome GetOutcome(GallioTestOutcome outcome)
        {
            if (outcome == GallioTestOutcome.Canceled)
                return VSTestOutcome.Aborted;
            if (outcome == GallioTestOutcome.Error)
                return VSTestOutcome.Error;
            if (outcome == GallioTestOutcome.Timeout)
                return VSTestOutcome.Timeout;
            if (outcome == GallioTestOutcome.Ignored || outcome == GallioTestOutcome.Pending || outcome == GallioTestOutcome.Explicit)
                return VSTestOutcome.NotRunnable;

            switch (outcome.Status)
            {
                case TestStatus.Passed:
                    return VSTestOutcome.Passed;

                case TestStatus.Inconclusive:
                    return VSTestOutcome.Inconclusive;

                case TestStatus.Skipped:
                    return VSTestOutcome.NotExecuted;

                case TestStatus.Failed:
                default:
                    return VSTestOutcome.Failed;
            }
        }