01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.debug.jdi.tests;
11:
12: import junit.framework.TestResult;
13: import junit.framework.TestSuite;
14:
15: /**
16: * A JDI test suite runs all tests defined in a JDI test case class.
17: * It runs the setUp method once before running the tests and the
18: * tearDown method once after.
19: */
20: public class JDITestSuite extends TestSuite {
21: private AbstractJDITest fTest;
22:
23: /**
24: * Creates a new test suite for the given JDI test.
25: * @param test
26: */
27: public JDITestSuite(AbstractJDITest test) {
28: super ();
29: fTest = test;
30: }
31:
32: /**
33: * Runs the tests and collects their result in a TestResult.
34: * @see junit.framework.TestSuite#run(junit.framework.TestResult)
35: */
36: public void run(TestResult result) {
37: fTest.setUp();
38: super.run(result);
39: fTest.tearDown();
40: }
41: }
|