private static string MapOutcome(string outcome, TestResultSetDrop setDrop, TestRunStatisticsDrop testRunStatistics) { switch (outcome) { case "Passed": { setDrop.PassedCount++; testRunStatistics.PassedCount++; break; } case "Failed": { setDrop.FailedCount++; testRunStatistics.FailedCount++; break; } case "NotExecuted": { setDrop.SkippedCount++; testRunStatistics.SkippedCount++; return("Skipped"); } default: { throw new Exception("Unknown Outcome"); } } return(outcome); }
private static string MapOutcome(Testcase test, TestResultSetDrop setDrop, TestRunStatisticsDrop testRunStatistics) { if (test.System_ErrSpecified || test.FailureSpecified) { setDrop.FailedCount++; testRunStatistics.FailedCount++; return("Failed"); } else if (test.Skipped != null) { setDrop.SkippedCount++; testRunStatistics.SkippedCount++; return("Skipped"); } else { setDrop.PassedCount++; testRunStatistics.PassedCount++; return("Passed"); } }