C# Класс 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.
Наследование: ITestListener
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Failure bool

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
ExploreTests ( ) : void
RunTests ( ITestFilter filter ) : void

Описание методов

Execute() публичный Метод

Execute a test run based on the aruments passed from Main.
public Execute ( string args ) : void
args string An array of arguments
Результат void

TestFinished() публичный Метод

A test has just finished
public TestFinished ( ITestResult result ) : void
result ITestResult The result of the test
Результат void

TestOutput() публичный Метод

A test has produced some text output
public TestOutput ( TestOutput testOutput ) : void
testOutput TestOutput A TestOutput object holding the text that was written
Результат void

TestStarted() публичный Метод

A test has just started
public TestStarted ( ITest test ) : void
test ITest The test
Результат void

TextUI() публичный Метод

Initializes a new instance of the TextUI class.
public TextUI ( ) : System
Результат System

TextUI() публичный Метод

Initializes a new instance of the TextUI class.
public TextUI ( TextWriter writer ) : System
writer System.IO.TextWriter The TextWriter to use.
Результат System

TextUI() публичный Метод

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.
Результат System

TopLevelHandler() публичный Метод

public TopLevelHandler ( object sender, UnhandledExceptionEventArgs e ) : void
sender object
e System.UnhandledExceptionEventArgs
Результат void

WriteHeader() публичный статический Метод

Write the standard header information to a TextWriter.
public static WriteHeader ( TextWriter writer ) : void
writer System.IO.TextWriter The TextWriter to use
Результат void

WriteRuntimeEnvironment() публичный статический Метод

Write information about the current runtime environment
public static WriteRuntimeEnvironment ( TextWriter writer ) : void
writer System.IO.TextWriter The TextWriter to be used
Результат void

Описание свойств

Failure публичное свойство

public bool Failure
Результат bool