Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ITestListener.cs « NUnitCore « src « nunit « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 175814b5d32bef0a60e0cf826990395ae6f2f23d (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
66
67
68
69
70
71
72
73
74
75
76
77
78
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 t);
    
    /// <summary>A failure occurred.</summary>
    void AddFailure(ITest test, AssertionFailedError t);
    
    /// <summary>A test ended.</summary>
    void EndTest(ITest test); 
    
    /// <summary>A test started.</summary>
    void StartTest(ITest test);
  }
  /// <summary>
  /// 
  /// </summary>
  public delegate void TestEventHandler(Object source, TestEventArgs e);
  /// <summary>
  /// 
  /// </summary>
  public class TestEventArgs : EventArgs{
  /// <summary>
  /// 
  /// </summary>
    protected ITest fTest;
  /// <summary>
  /// 
  /// </summary>
    protected TestEventArgs (){}
  /// <summary>
  /// 
  /// </summary>
  /// <param name="test"></param>
    public TestEventArgs (ITest test){
      fTest = test;
    }
    /// <summary>
    /// 
    /// </summary>
    public ITest Test{
      get{return fTest;}
    }
  }
  /// <summary>
  /// 
  /// </summary>
  public delegate void TestExceptionEventHandler(Object source,
                                                 TestExceptionEventArgs e);
  /// <summary>
  /// 
  /// </summary>
  public class TestExceptionEventArgs : TestEventArgs{
    private TestExceptionEventArgs(){}
    
    private Exception fThrownException;
    /// <summary>
    /// 
    /// </summary>
    /// <param name="test"></param>
    /// <param name="e"></param>
    public TestExceptionEventArgs(ITest test, Exception e){
      //this(test);
      fTest = test;
      fThrownException = e;
    }
    /// <summary>
    /// 
    /// </summary>
    public Exception ThrownException{
      get{return fThrownException;}
    }
  }
}