/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="testMethodName">The test method name</param>
 /// <param name="testStatus">The test execution status (Passed / Failed)</param>
 /// <param name="executionDurationMilliseconds">The test execution time in milliseconds</param>
 /// <param name="failedMessage">If the test was failing: The exception message; null if the test has passed</param>
 public UnitTestResult(string testMethodName, UnitTestStatus testStatus, decimal executionDurationMilliseconds, string failedMessage)
 {
     TestMethodName = testMethodName;
     TestStatus     = testStatus;
     ExecutionDurationMilliseconds = executionDurationMilliseconds;
     FailedMessage = failedMessage;
 }
Exemplo n.º 2
0
 private static TestResult TranslateStatus(UnitTestStatus status)
 {
     if (status == UnitTestStatus.Success)
     {
         return(TestResult.Success);
     }
     if (status == UnitTestStatus.Failed)
     {
         return(TestResult.Failed);
     }
     if (status == UnitTestStatus.Ignored)
     {
         return(TestResult.Ignored);
     }
     if (status == UnitTestStatus.Inconclusive)
     {
         return(TestResult.Error);
     }
     return(TestResult.Unknown);
 }