/// <summary> /// Sets the background color and writes the test result and name. /// </summary> internal virtual void WriteTestResult(TestResult testResult) { ColorFormatter.SetColor( ForegroundColor, testResult.Success ? SuccessColor : FailureColor ); WriteObject(string.Format(TestResultLineTemplate, testResult.Success ? 'P' : 'F', testResult.TestName)); if (testResult.Exception != null) { WriteObject(testResult.Exception); } }
/// <summary> /// Writes the end result of the invoked test results. /// </summary> internal virtual void WriteEndResult() { ColorFormatter.SetColor( ForegroundColor, Success ? SuccessColor : FailureColor ); string endResult = string.Format( "Passed tests: {0}/{1}.", NumberOfSuccessfulTestResults, NumberOfTestResults ); WriteObject(string.Empty); WriteObject(string.Format(EndResultLineTemplate, endResult)); }