Interface ITestListener
The ITestListener interface is used internally to receive notifications of significant events while a test is being run. The events are propagated to clients by means of an AsyncCallback. NUnit extensions may also monitor these events.
Namespace: NUnit.Framework.Interfaces
Assembly: nunit.framework.dll
Syntax
public interface ITestListener
Methods
View SourceSendMessage(TestMessage)
Called when a test produces a message to be sent to listeners
Declaration
void SendMessage(TestMessage message)
Parameters
Type | Name | Description |
---|---|---|
TestMessage | message | A TestMessage object containing the text to send |
TestFinished(ITestResult)
Called when a test has finished
Declaration
void TestFinished(ITestResult result)
Parameters
Type | Name | Description |
---|---|---|
ITestResult | result | The result of the test |
TestOutput(TestOutput)
Called when a test produces output for immediate display
Declaration
void TestOutput(TestOutput output)
Parameters
Type | Name | Description |
---|---|---|
TestOutput | output | A TestOutput object containing the text to display |
TestStarted(ITest)
Called when a test has just started
Declaration
void TestStarted(ITest test)
Parameters
Type | Name | Description |
---|---|---|
ITest | test | The test that is starting |