KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > junitx > runner > engine > MockListener


1 package junitx.runner.engine;
2
3 import java.util.Properties JavaDoc;
4
5 import junit.framework.Test;
6 import junit.framework.TestResult;
7
8 /**
9  * @version $Revision: 1.2 $, $Date: 2003/05/08 02:51:16 $
10  * @author <a HREF="mailto:vbossica@users.sourceforge.net">Vladimir Ritz Bossicard</a>
11  */

12 public class MockListener implements RunListener {
13
14         int run_started = 0;
15         int run_stopped = 0;
16         int run_ended = 0;
17         int test_ignored = 0;
18         int test_started = 0;
19         int test_failure = 0;
20         int test_error = 0;
21         int test_success = 0;
22
23         public void setRunContext(RunContext context) {
24         }
25
26         public void init(Properties JavaDoc props) {
27         }
28
29         public void runStarted(Test test, long time) {
30             run_started++;
31         }
32
33         public void runStopped(Test test, long duration) {
34             run_stopped++;
35         }
36
37         public void runEnded(Test test, TestResult result, long duration) {
38             run_ended++;
39         }
40
41         public void testIgnored(Test test) {
42             test_ignored++;
43         }
44
45         public void testStarted(Test test, TestResult result) {
46             test_started++;
47         }
48
49         public void testFailure(Test test, TestResult result, Throwable JavaDoc t) {
50             test_failure++;
51         }
52
53         public void testError(Test test, TestResult result, Throwable JavaDoc t) {
54             test_error++;
55         }
56
57         public void testSuccess(Test test, TestResult result) {
58             test_success++;
59         }
60
61 }
62
Popular Tags