01: package visualdebugger;
02:
03: import org.eclipse.jdt.junit.ITestRunListener;
04:
05: import de.uka.ilkd.key.visualdebugger.DebuggerEvent;
06: import de.uka.ilkd.key.visualdebugger.VisualDebugger;
07:
08: public class VBTestRunListener implements ITestRunListener {
09:
10: public void testEnded(String testId, String testName) {
11: // TODO Auto-generated method stub
12:
13: }
14:
15: public void testFailed(int status, String testId, String testName,
16: String trace) {
17:
18: final int index = testName.indexOf("(");
19: final String methodName = testName.substring(0, index);
20: final String className = testName.substring(index + 1, testName
21: .length() - 1);
22:
23: VisualDebugger.TestCaseIdentifier tci = VisualDebugger
24: .getVisualDebugger().new TestCaseIdentifier(className,
25: methodName);
26: if (VisualDebugger.getVisualDebugger().getNodeForTC(className,
27: methodName) != null)
28: VisualDebugger.getVisualDebugger().fireDebuggerEvent(
29: new DebuggerEvent(DebuggerEvent.TEST_RUN_FAILED,
30: tci));
31:
32: }
33:
34: public void testReran(String testId, String testClass,
35: String testName, int status, String trace) {
36: // TODO Auto-generated method stub
37:
38: }
39:
40: public void testRunEnded(long elapsedTime) {
41: // TODO Auto-generated method stub
42:
43: }
44:
45: public void testRunStarted(int testCount) {
46: // TODO Auto-generated method stub
47:
48: }
49:
50: public void testRunStopped(long elapsedTime) {
51: // TODO Auto-generated method stub
52:
53: }
54:
55: public void testRunTerminated() {
56: // TODO Auto-generated method stub
57:
58: }
59:
60: public void testStarted(String testId, String testName) {
61: // TODO Auto-generated method stub
62:
63: }
64:
65: }
|