1 package net.sourceforge.ejtools.management.test; 2 3 import java.util.Enumeration ; 4 import java.util.Vector ; 5 6 import junit.extensions.jfunc.JFuncResult; 7 import junit.framework.Test; 8 9 import org.apache.log4j.Category; 10 11 19 public class ReportTestResult extends JFuncResult 20 { 21 22 private static Category logger = Category.getInstance(ReportTestResult.class); 23 24 27 public ReportTestResult() 28 { 29 super(); 30 } 31 32 public synchronized void addInfo(Test test, String key, String value) 33 { 34 for(Enumeration e = cloneListeners().elements(); e.hasMoreElements();) 35 { 36 Object 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 cloneListeners() 44 { 45 return (Vector )super.fListeners.clone(); 46 } 47 48 } 49 | Popular Tags |