// **************************************************************** // Copyright 2007, Charlie Poole // This is free software licensed under the NUnit license. You may // obtain a copy of the license at http://nunit.org/?p=license&r=2.4 // **************************************************************** namespace NUnit.Core { using System; /// /// The TestOutput class holds a unit of output from /// a test to either stdOut or stdErr /// [Serializable] public class TestOutput { string text; TestOutputType type; /// /// Construct with text and an ouput destination type /// /// Text to be output /// Destination of output public TestOutput(string text, TestOutputType type) { this.text = text; this.type = type; } /// /// Return string representation of the object for debugging /// /// public override string ToString() { return type + ": " + text; } /// /// Get the text /// public string Text { get { return this.text; } } /// /// Get the output type /// public TestOutputType Type { get { return this.type; } } } /// /// Enum representing the output destination /// It uses combinable flags so that a given /// output control can accept multiple types /// of output. Normally, each individual /// output uses a single flag value. /// public enum TestOutputType { /// /// Send output to stdOut /// Out, /// /// Send output to stdErr /// Error, /// /// Send output to Trace /// Trace, /// /// Send output to Log /// Log } }