C# Class NUnitLite.Runner.TextUI

TextUI is a general purpose class that runs tests and outputs to a TextWriter. Call it from your Main like this: new TextUI(textWriter).Execute(args); OR new TextUI().Execute(args); The provided TextWriter is used by default, unless the arguments to Execute override it using -out. The second form uses the Console, provided it exists on the platform. NOTE: When running on a platform without a Console, such as Windows Phone, the results will simply not appear if you fail to specify a file in the call itself or as an option.
Inheritance: ITestListener
Show file Open project: mono/NUnitLite Class Usage Examples

Public Properties

Property Type Description
Failure bool

Public Methods

Method Description
Execute ( string args ) : void

Execute a test run based on the aruments passed from Main.

TestFinished ( ITestResult result ) : void

A test has just finished

TestOutput ( TestOutput testOutput ) : void

A test has produced some text output

TestStarted ( ITest test ) : void

A test has just started

TextUI ( ) : System

Initializes a new instance of the TextUI class.

TextUI ( TextWriter writer ) : System

Initializes a new instance of the TextUI class.

TextUI ( TextWriter writer, ITestListener listener ) : System

Initializes a new instance of the TextUI class.

TopLevelHandler ( object sender, UnhandledExceptionEventArgs e ) : void
WriteHeader ( TextWriter writer ) : void

Write the standard header information to a TextWriter.

WriteRuntimeEnvironment ( TextWriter writer ) : void

Write information about the current runtime environment

Private Methods

Method Description
ExploreTests ( ) : void
RunTests ( ITestFilter filter ) : void

Method Details

Execute() public method

Execute a test run based on the aruments passed from Main.
public Execute ( string args ) : void
args string An array of arguments
return void

TestFinished() public method

A test has just finished
public TestFinished ( ITestResult result ) : void
result ITestResult The result of the test
return void

TestOutput() public method

A test has produced some text output
public TestOutput ( TestOutput testOutput ) : void
testOutput TestOutput A TestOutput object holding the text that was written
return void

TestStarted() public method

A test has just started
public TestStarted ( ITest test ) : void
test ITest The test
return void

TextUI() public method

Initializes a new instance of the TextUI class.
public TextUI ( ) : System
return System

TextUI() public method

Initializes a new instance of the TextUI class.
public TextUI ( TextWriter writer ) : System
writer System.IO.TextWriter The TextWriter to use.
return System

TextUI() public method

Initializes a new instance of the TextUI class.
public TextUI ( TextWriter writer, ITestListener listener ) : System
writer System.IO.TextWriter The TextWriter to use.
listener ITestListener The Test listener to use.
return System

TopLevelHandler() public method

public TopLevelHandler ( object sender, UnhandledExceptionEventArgs e ) : void
sender object
e System.UnhandledExceptionEventArgs
return void

WriteHeader() public static method

Write the standard header information to a TextWriter.
public static WriteHeader ( TextWriter writer ) : void
writer System.IO.TextWriter The TextWriter to use
return void

WriteRuntimeEnvironment() public static method

Write information about the current runtime environment
public static WriteRuntimeEnvironment ( TextWriter writer ) : void
writer System.IO.TextWriter The TextWriter to be used
return void

Property Details

Failure public property

public bool Failure
return bool