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.BreakpointRequest;
13:
14: /**
15: * Tests for JDI com.sun.jdi.request.BreakpointRequest.
16: */
17: public class BreakpointRequestTest extends AbstractJDITest {
18:
19: private BreakpointRequest fRequest;
20:
21: /**
22: * Creates a new test .
23: */
24: public BreakpointRequestTest() {
25: super ();
26: }
27:
28: /**
29: * Init the fields that are used by this test only.
30: */
31: public void localSetUp() {
32: // Get the breakpoint request
33: fRequest = getBreakpointRequest();
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 breakpoint 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 BreakpointRequestTest().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.BreakpointRequest";
58: }
59:
60: /**
61: * Test JDI location().
62: */
63: public void testJDILocation() {
64: assertEquals("1", getLocation(), fRequest.location());
65: }
66: }
|