KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > ejtools > management > test > ReportTestResult


1 package net.sourceforge.ejtools.management.test;
2
3 import java.util.Enumeration JavaDoc;
4 import java.util.Vector JavaDoc;
5
6 import junit.extensions.jfunc.JFuncResult;
7 import junit.framework.Test;
8
9 import org.apache.log4j.Category;
10
11 /**
12  * @author letiembl
13  *
14  * To change this generated comment edit the template variable "typecomment":
15  * Window>Preferences>Java>Templates.
16  * To enable and disable the creation of type comments go to
17  * Window>Preferences>Java>Code Generation.
18  */

19 public class ReportTestResult extends JFuncResult
20 {
21    /** Description of the Field */
22    private static Category logger = Category.getInstance(ReportTestResult.class);
23
24     /**
25      * Constructor for CustomTestResult.
26      */

27     public ReportTestResult()
28     {
29         super();
30     }
31
32     public synchronized void addInfo(Test test, String JavaDoc key, String JavaDoc value)
33     {
34         for(Enumeration JavaDoc e = cloneListeners().elements(); e.hasMoreElements();)
35         {
36             Object JavaDoc listen = e.nextElement();
37             if(Report.class.isAssignableFrom(listen.getClass()))
38                 ((Report)listen).addInfo(test, key, value);
39         }
40
41     }
42
43     private synchronized Vector JavaDoc cloneListeners()
44     {
45         return (Vector JavaDoc)super.fListeners.clone();
46     }
47
48 }
49
Popular Tags