[P-unit-devel] SF.net SVN: p-unit: [262] trunk/punit.extension/src/org/punit
Status: Beta
Brought to you by:
zhanghuangzhu
|
From: <zha...@us...> - 2007-12-25 12:35:12
|
Revision: 262
http://p-unit.svn.sourceforge.net/p-unit/?rev=262&view=rev
Author: zhanghuangzhu
Date: 2007-12-25 04:35:17 -0800 (Tue, 25 Dec 2007)
Log Message:
-----------
Andrew Zhang: introduced VanillaEventListener
Modified Paths:
--------------
trunk/punit.extension/src/org/punit/listener/FieldSetter.java
trunk/punit.extension/src/org/punit/reporter/chart/AbstractChartReporter.java
Modified: trunk/punit.extension/src/org/punit/listener/FieldSetter.java
===================================================================
--- trunk/punit.extension/src/org/punit/listener/FieldSetter.java 2007-12-25 12:35:05 UTC (rev 261)
+++ trunk/punit.extension/src/org/punit/listener/FieldSetter.java 2007-12-25 12:35:17 UTC (rev 262)
@@ -1,21 +1,16 @@
/* (C) Copyright 2007, by Andrew Zhang */
package org.punit.listener;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Properties;
-
-import org.punit.events.EventListener;
-import org.punit.runner.Runner;
-import org.punit.type.TestSuite;
-import org.punit.watcher.Watcher;
import java.lang.reflect.*;
+import java.util.*;
+
+import org.punit.events.*;
import org.punit.util.*;
/**
* The listener sets class public fields using properties.
*/
-public class FieldSetter implements EventListener {
+public class FieldSetter extends VanillaEventListener {
private static final long serialVersionUID = 5194809928409791777L;
@@ -25,61 +20,10 @@
_properties = properties;
}
- @SuppressWarnings("unchecked")
- public void onMethodEnd(Method method, Object testInstance,
- Object[] params, Throwable t, List Watchers) {
- }
-
- public void onClassEnd(Object testInstance, Throwable t) {
- }
-
public void onClassStart(Object testInstance) {
setClassFields(testInstance, _properties);
}
- public void onMethodStart(Method method, Object testInstance,
- Object[] params) {
-
- }
-
- @SuppressWarnings("unchecked")
- public void onRunnerEnd(Class clazz, Runner runner) {
- }
-
- @SuppressWarnings("unchecked")
- public void onRunnerStart(Class clazz, Runner runner) {
- }
-
- public void onSuiteEnd(TestSuite suite) {
-
- }
-
- public void onSuiteStart(TestSuite suite) {
-
- }
-
- public void onWatcherEnd(Watcher watcher) {
-
- }
-
- public void onWatcherStart(Watcher watcher) {
-
- }
-
- @SuppressWarnings("unchecked")
- public void onWatchersEnd(List watchers) {
-
- }
-
- @SuppressWarnings("unchecked")
- public void onWatchersStart(List watchers) {
-
- }
-
- public boolean supportParentRunner() {
- return false;
- }
-
private final String PACKAGE_SEPARATOR = "."; //$NON-NLS-1$
/**
Modified: trunk/punit.extension/src/org/punit/reporter/chart/AbstractChartReporter.java
===================================================================
--- trunk/punit.extension/src/org/punit/reporter/chart/AbstractChartReporter.java 2007-12-25 12:35:05 UTC (rev 261)
+++ trunk/punit.extension/src/org/punit/reporter/chart/AbstractChartReporter.java 2007-12-25 12:35:17 UTC (rev 262)
@@ -12,7 +12,7 @@
import org.jfree.chart.JFreeChart;
import org.jfree.data.category.DefaultCategoryDataset;
-import org.punit.events.EventListener;
+import org.punit.events.*;
import org.punit.exception.IOException;
import org.punit.message.Messages;
import org.punit.reporter.chart.image.ImageConstants;
@@ -26,7 +26,7 @@
import org.punit.util.TraverserUtil;
import org.punit.watcher.Watcher;
-public abstract class AbstractChartReporter implements EventListener {
+public abstract class AbstractChartReporter extends VanillaEventListener {
private Hashtable<DatasetKey, DefaultCategoryDataset> _datasets = new Hashtable<DatasetKey, DefaultCategoryDataset>();
@@ -221,27 +221,4 @@
});
}
- public void onWatcherStart(Watcher watcher) {
- // nothing needs to be done
- }
-
- public void onWatcherEnd(Watcher watcher) {
- // nothing needs to be done
- }
-
- @SuppressWarnings("unchecked")
- public void onWatchersStart(List watchers) {
- // nothing needs to be done
- }
-
- @SuppressWarnings("unchecked")
- public void onWatchersEnd(List watchers) {
- // nothing needs to be done
- }
-
- public void onMethodStart(Method method, Object testInstance,
- Object[] params) {
- // nothing needs to be done
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|