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.StringReference;
13:
14: /**
15: * Tests for JDI com.sun.jdi.StringReference
16: * and JDWP String command set.
17: */
18: public class StringReferenceTest extends AbstractJDITest {
19:
20: private StringReference fString;
21:
22: /**
23: * Creates a new test.
24: */
25: public StringReferenceTest() {
26: super ();
27: }
28:
29: /**
30: * Init the fields that are used by this test only.
31: */
32: public void localSetUp() {
33: // Get static field "fString"
34: fString = getStringReference();
35: }
36:
37: /**
38: * Run all tests and output to standard output.
39: * @param args
40: */
41: public static void main(java.lang.String[] args) {
42: new StringReferenceTest().runSuite(args);
43: }
44:
45: /**
46: * Gets the name of the test case.
47: * @see junit.framework.TestCase#getName()
48: */
49: public String getName() {
50: return "com.sun.jdi.StringReference";
51: }
52:
53: /**
54: * Test JDI value() and JDWP 'String - Get value'.
55: */
56: public void testJDIValue() {
57: String value = fString.value();
58: assertEquals("1", "Hello World", value);
59: }
60: }
|