public OutputType GenerateOutput(string standardOut, string standardError, OutputTypeErrorInfo errorInfo) { var output = new OutputType(); if (!string.IsNullOrWhiteSpace(standardOut)) output.StdOut = standardOut; if (!string.IsNullOrWhiteSpace(standardError)) output.StdErr = standardError; if (errorInfo != null) output.ErrorInfo = errorInfo; return output; }
public UnitTestResultType GenerateUnitTestResult(Guid executionId, Guid testId, string testName, string computerName, TimeSpan duration, DateTime startTime, DateTime endTime, Guid testType, string outcome, Guid testListId, Guid relativeResultsDirectory, OutputType output) { return new UnitTestResultType() { executionId = executionId.ToString(), testId = testId.ToString(), testName = testName, computerName = computerName, duration = duration.ToString(TimeSpanFormat), startTime = startTime.ToString(DateTimeFormat), endTime = endTime.ToString(DateTimeFormat), testType = testType.ToString(), outcome = outcome, testListId = testListId.ToString(), relativeResultsDirectory = relativeResultsDirectory.ToString(), Items = new object[] { output } }; }