override public void Flush() { if (sb.Length > 0) { lock ( sb ) { TestOutput output = new TestOutput(sb.ToString(), this.type); this.eventListener.TestOutput(output); sb.Length = 0; } } }
public void TestOutput(TestOutput testOutput) { if (this.currentTest == null) return; // Ignore TeamCity control messages. These are probably our own messages anyway. if (testOutput.Text.ToLowerInvariant().Contains("##teamcity")) return; // Ignore blank messages, or messages that consist of empty lines. if (string.IsNullOrWhiteSpace(testOutput.Text)) return; if (testOutput.Type == TestOutputType.Error) Console.WriteLine(TeamCityMessageFormatter.FormatTestErrorMessage(this.currentTest, testOutput.Text.Trim())); else if (testOutput.Type != TestOutputType.Trace) Console.WriteLine(TeamCityMessageFormatter.FormatTestOutputMessage(this.currentTest, testOutput.Text.Trim())); }
void EventListener.TestOutput(TestOutput testOutput) { switch (testOutput.Type) { case TestOutputType.Out: _testOutput.Append(testOutput.Text); break; case TestOutputType.Error: Console.Error.Write(testOutput.Text); break; default: // Ignore any other output type break; } }
/// <summary> /// capture any console output during the testing. /// </summary> /// <param name="testOutput"></param> public void TestOutput(TestOutput testOutput) { currentTestOutput = testOutput.Text; }
/// <summary> /// A message has been output to the console. /// </summary> /// <param name="testOutput">A console message</param> public void TestOutput(TestOutput output) { events.Enqueue(new OutputEvent(output)); }
override public void Flush() { if ( sb.Length > 0 ) { lock( sb ) { TestOutput output = new TestOutput(sb.ToString(), this.type); this.eventListener.TestOutput( output ); sb.Length = 0; } } }
public void TestOutput(TestOutput testOutput) { string message = testOutput.Text; int length = message.Length; int drop = message.EndsWith(Environment.NewLine) ? Environment.NewLine.Length : message[length - 1] == '\n' || message[length - 1] == '\r' ? 1 : 0; if (drop > 0) message = message.Substring(0, length - drop); message = message.Trim(); if (!string.IsNullOrEmpty(message)) testLog.SendMessage(TestMessageLevel.Informational, message); string type=""; // Consider adding this later, as an option. //switch (testOutput.Type) //{ // case TestOutputType.Trace: // type ="Debug: "; // break; // case TestOutputType.Out: // type ="Console: "; // break; // case TestOutputType.Log: // type="Log: "; // break; // case TestOutputType.Error: // type="Error: "; // break; //} this.Output += (type+message+'\r'); }
public void TestOutput( TestOutput output) { switch ( output.Type ) { case TestOutputType.Out: outWriter.Write( output.Text ); break; case TestOutputType.Error: errorWriter.Write( output.Text ); break; } }
void EventListener.TestOutput(TestOutput testOutput) { this.FireTestOutput(testOutput); }
public void TestOutput(TestOutput testOutput) { Console.WriteLine(testOutput.Text); }
public void TestOutput(TestOutput testOutput) { Console.WriteLine("output: "+testOutput); }
public void TestOutput(TestOutput testOutput) { Console.WriteLine("TestOutput : {0}", testOutput); }
public void TestOutput (TestOutput testOutput) { if (consoleOutput == null) { Console.WriteLine (testOutput.Text); return; } else if (testOutput.Type == TestOutputType.Out) consoleOutput.Append (testOutput.Text); else consoleError.Append (testOutput.Text); }
public void Write(TestOutput output) { Write(output.Text); }
void EventListener.TestOutput(TestOutput testOutput) { if (testContextStack.Count == 0) return; ITestContext testContext = testContextStack.Peek(); string streamName; switch (testOutput.Type) { default: case TestOutputType.Out: streamName = MarkupStreamNames.ConsoleOutput; break; case TestOutputType.Error: streamName = MarkupStreamNames.ConsoleError; break; case TestOutputType.Trace: streamName = MarkupStreamNames.DebugTrace; break; } testContext.LogWriter[streamName].Write(testOutput.Text); }
public void TestOutput(TestOutput testOutput) { if (m_testLog != null) m_testLog.AppendLine(testOutput.Text); }
public void TestOutput(TestOutput output) { listener.TestOutput (output); }
public void TestOutput(TestOutput testOutput) { myClient.testOutput(myLastTest, testOutput.Text, testOutput.Type == TestOutputType.Out); }
/// <summary> /// A message has been output to the console. /// </summary> /// <param name="testOutput">A console message</param> public void TestOutput( TestOutput output ) { events.Enqueue( new OutputEvent( output ) ); }
public void TestOutput (TestOutput testOutput) { // Console.WriteLine("TestOutput"); }
public OutputEvent( TestOutput output ) { this.output = output; }
public void TestOutput(TestOutput testOutput) { _log.Info("Test output: " + testOutput.ToString()); }
public void TestOutput(TestOutput testOutput) { log(testOutput.Text); }
public void Write(NUnit.Core.TestOutput output) { Write(output.Text); }
public void FireTestOutput( TestOutput testOutput ) { Fire( TestOutput, new TestEventArgs( TestAction.TestOutput, testOutput ) ); }
public OutputEvent(TestOutput output) { this.output = output; }
/// <summary> /// Called when the test direts output to the console. /// </summary> /// <param name="testOutput">A console message</param> public void TestOutput(TestOutput testOutput) { if (this.eventListener != null) { this.eventListener.TestOutput(testOutput); } }
public void TestOutput(TestOutput testOutput) { _log(string.Format(testOutput.Text.Replace(Environment.NewLine, ""))); }
// TestOutput public TestEventArgs( TestAction action, TestOutput testOutput ) { Debug.Assert( action == TestAction.TestOutput, "Invalid TestAction argument to TestEventArgs constructor" ); this.action = action; this.testOutput = testOutput; }
public void TestOutput(TestOutput testOutput) { if (m_EventListener != null) { m_EventListener.TestOutput(testOutput); } }
/// <summary> /// Trigger event when output occurs during a test /// </summary> /// <param name="testOutput">The test output</param> public void TestOutput(TestOutput testOutput) { events.FireTestOutput( testOutput ); }
public void TestOutput(TestOutput testOutput) { this.listener.TestOutput(testOutput); }
public void TestOutput(TestOutput testOutput) { }
public void TestOutput(TestOutput testOutput) { if (_outWriter.Value != null) _outWriter.Value.Write(testOutput.Text); else _wrapped.TestOutput(testOutput); }