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
Afficher le fichier Open project: mono/NUnitLite Class Usage Examples

Méthodes publiques

Свойство Type Description
Failure bool

Méthodes publiques

Méthode 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

Méthode Description
ExploreTests ( ) : void
RunTests ( ITestFilter filter ) : void

Method Details

Execute() public méthode

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

TestFinished() public méthode

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

TestOutput() public méthode

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

TestStarted() public méthode

A test has just started
public TestStarted ( ITest test ) : void
test ITest The test
Résultat void

TextUI() public méthode

Initializes a new instance of the TextUI class.
public TextUI ( ) : System
Résultat System

TextUI() public méthode

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

TextUI() public méthode

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.
Résultat System

TopLevelHandler() public méthode

public TopLevelHandler ( object sender, UnhandledExceptionEventArgs e ) : void
sender object
e System.UnhandledExceptionEventArgs
Résultat void

WriteHeader() public static méthode

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

WriteRuntimeEnvironment() public static méthode

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

Property Details

Failure public_oe property

public bool Failure
Résultat bool