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 com.sun.jdi.request.ExceptionRequest;
13:
14: /**
15: * Tests for JDI com.sun.jdi.request.ExceptionRequest.
16: */
17: public class ExceptionRequestTest extends AbstractJDITest {
18:
19: private ExceptionRequest fRequest;
20:
21: /**
22: * Creates a new test .
23: */
24: public ExceptionRequestTest() {
25: super ();
26: }
27:
28: /**
29: * Init the fields that are used by this test only.
30: */
31: public void localSetUp() {
32: // Get the exception request
33: fRequest = getExceptionRequest();
34: }
35:
36: /**
37: * Make sure the test leaves the VM in the same state it found it.
38: */
39: public void localTearDown() {
40: // Delete the exception request we created in this test
41: fVM.eventRequestManager().deleteEventRequest(fRequest);
42: }
43:
44: /**
45: * Run all tests and output to standard output.
46: * @param args
47: */
48: public static void main(java.lang.String[] args) {
49: new ExceptionRequestTest().runSuite(args);
50: }
51:
52: /**
53: * Gets the name of the test case.
54: * @see junit.framework.TestCase#getName()
55: */
56: public String getName() {
57: return "com.sun.jdi.request.ExceptionRequest";
58: }
59:
60: /**
61: * Test JDI exception().
62: */
63: public void testJDIException() {
64: assertTrue("1", fRequest.exception() == null);
65: }
66: }
|