1 // ****************************************************************
\r
2 // This is free software licensed under the NUnit license. You
\r
3 // may obtain a copy of the license as well as information regarding
\r
4 // copyright ownership at http://nunit.org/?p=license&r=2.4.
\r
5 // ****************************************************************
\r
12 /// The EventListener interface is used within the NUnit core to receive
\r
13 /// notifications of significant events while a test is being run. These
\r
14 /// events are propogated to any client, which may choose to convert them
\r
15 /// to .NET events or to use them directly.
\r
17 public interface EventListener
\r
20 /// Called when a test run is starting
\r
22 /// <param name="name">The name of the test being started</param>
\r
23 /// <param name="testCount">The number of test cases under this test</param>
\r
24 void RunStarted( string name, int testCount );
\r
27 /// Called when a run finishes normally
\r
29 /// <param name="result">The result of the test</param>
\r
30 void RunFinished( TestResult result );
\r
33 /// Called when a run is terminated due to an exception
\r
35 /// <param name="exception">Exception that was thrown</param>
\r
36 void RunFinished( Exception exception );
\r
39 /// Called when a test case is starting
\r
41 /// <param name="testName">The name of the test case</param>
\r
42 void TestStarted(TestName testName);
\r
45 /// Called when a test case has finished
\r
47 /// <param name="result">The result of the test</param>
\r
48 void TestFinished(TestCaseResult result);
\r
51 /// Called when a suite is starting
\r
53 /// <param name="testName">The name of the suite</param>
\r
54 void SuiteStarted(TestName testName);
\r
57 /// Called when a suite has finished
\r
59 /// <param name="result">The result of the suite</param>
\r
60 void SuiteFinished(TestSuiteResult result);
\r
63 /// Called when an unhandled exception is detected during
\r
64 /// the execution of a test run.
\r
66 /// <param name="exception">The exception thta was detected</param>
\r
67 void UnhandledException( Exception exception );
\r
70 /// Called when the test direts output to the console.
\r
72 /// <param name="testOutput">A console message</param>
\r
73 void TestOutput(TestOutput testOutput);
\r