/// <summary> /// Sets the background color and writes the test name. /// </summary> internal virtual void WriteTestResult(TestResult testResult) { ColorFormatter.SetBackgroundColor( testResult.Success ? SuccessColor : FailureColor ); WriteObject(string.Format(LineTemplate, testResult.TestName)); }
/// <summary> /// Writes the end result of the invoked test results. /// </summary> internal virtual void WriteEndResult() { ColorFormatter.SetBackgroundColor( Success ? SuccessColor : FailureColor ); string endResult = string.Format( "Passed tests: {0}/{1}.", NumberOfSuccessfulTestResults, NumberOfTestResults ); WriteObject(string.Empty); WriteObject(string.Format(LineTemplate, endResult)); }
/// <summary> /// Sets the background color back to the original and writes results. /// </summary> protected override void EndProcessing() { WriteEndResult(); ColorFormatter.SetBackgroundColor(OriginalBackGroundColor); }