blob: 87726ea95d48e958189140609498f1fe9f4b4caa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
namespace NUnit.Framework
{
using System;
/// <summary>A Listener for test progress</summary>
public interface ITestListener
{
/// <summary>An error occurred.</summary>
void AddError(ITest test, Exception ex);
/// <summary>A failure occurred.</summary>
void AddFailure(ITest test, AssertionFailedError ex);
/// <summary>A test ended.</summary>
void EndTest(ITest test);
/// <summary>A test started.</summary>
void StartTest(ITest test);
}
#if false
public class TestEventArgs : System.EventArgs
{
private readonly ITest fTest;
public TestEventArgs(ITest test) : base()
{
fTest = test;
}
public ITest Test
{
get { return fTest;}
}
}
public class TestErrorArgs : TestEventArgs
{
private readonly Exception fThrownException;
public TestErrorArgs(ITest test, Exception thrownException) : base(test)
{
fThrownException = thrownException;
}
public TestErrorArgs(TestFailure error)
: this(error.FailedTest,error.ThrownException){}
public Exception ThrownException
{
get { return fThrownException;}
}
}
public delegate void TestErrorHandler(TestFailure failure);
public delegate void TestEventHandler(ITest test);
public interface ITestEvents
{
event TestErrorHandler TestErred;
event TestErrorHandler TestFailed;
event TestEventHandler TestStarted;
event TestEventHandler TestEnded;
event TestEventHandler RunStarted;
event TestEventHandler RunEnded;
}
#endif
}
|