KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > ide > j2ee > runtime > nodes > ManagedObjectTest


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 /*
20  * ManagedObjectTest.java
21  * JUnit based test
22  *
23  * Created on April 16, 2004, 4:34 PM
24  */

25
26 package org.netbeans.modules.j2ee.sun.ide.j2ee.runtime.nodes;
27
28 import java.awt.event.ActionEvent JavaDoc;
29 import java.lang.reflect.Constructor JavaDoc;
30 import java.rmi.RemoteException JavaDoc;
31 import java.rmi.ServerException JavaDoc;
32 import java.util.Set JavaDoc;
33 import java.util.Map JavaDoc;
34 import java.util.List JavaDoc;
35 import java.util.Vector JavaDoc;
36 import java.util.Arrays JavaDoc;
37 import java.util.HashSet JavaDoc;
38 import java.util.HashMap JavaDoc;
39 import java.util.Hashtable JavaDoc;
40 import java.util.ArrayList JavaDoc;
41 import java.text.MessageFormat JavaDoc;
42 import javax.management.*;
43 import javax.swing.AbstractAction JavaDoc;
44 import junit.framework.*;
45 import org.openide.NotifyDescriptor;
46 import org.openide.nodes.Node.Cookie;
47 import org.openide.nodes.Node.Property;
48 import org.openide.nodes.Node;
49 import org.openide.util.NbBundle;
50 import org.openide.util.HelpCtx;
51 import org.openide.nodes.Sheet;
52 import org.openide.nodes.PropertySupport;
53 import org.openide.nodes.PropertySupport.ReadOnly;
54 import org.openide.nodes.PropertySupport.ReadWrite;
55 import org.openide.execution.NbClassPath;
56 import java.beans.PropertyDescriptor JavaDoc;
57 import java.beans.PropertyEditor JavaDoc;
58 import org.netbeans.modules.j2ee.sun.ide.editors.NameValuePair;
59 import org.netbeans.modules.j2ee.sun.ide.editors.BooleanEditor;
60 import org.netbeans.modules.j2ee.sun.ide.editors.NameValuePairsPropertyEditor;
61 import org.netbeans.modules.j2ee.sun.ide.j2ee.mbmapping.*;
62 import org.netbeans.modules.j2ee.sun.ide.j2ee.ui.Util;
63
64 /**
65  *
66  * @author vkraemer
67  */

68 public class ManagedObjectTest extends TestCase {
69     
70     public void testCreateClasspathArray() {
71         String JavaDoc [] retVal = ManagedObject.createClasspathArray("/a/b/c:/x/y/z");
72         assertNotNull(retVal);
73         assertEquals(2, retVal.length);
74         assertEquals("/a/b/c",retVal[0]);
75         assertEquals("/x/y/z",retVal[1]);
76     }
77     
78     public void testToPumpCoverage() {
79         Set JavaDoc s = ManagedObject.moduleTypes;
80         Map JavaDoc foo = ManagedObject.getIconBases();
81         foo = ManagedObject.getToolTips();
82         foo = ManagedObject.getHelpIDs();
83         foo = ManagedObject.getPropertiesHelpIDs();
84         foo = ManagedObject.standardOpsStart;
85         foo = ManagedObject.standardOpsStop;
86         foo = ManagedObject.standardOpsResources;
87         Object JavaDoc bar = ManagedObject.getObjectValue("123",Integer JavaDoc.class);
88         Class JavaDoc t = ManagedObject.getSupportedType("int");
89     }
90     
91     public ManagedObjectTest(java.lang.String JavaDoc testName) {
92         super(testName);
93     }
94     
95 }
96
Popular Tags