001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041: /*
042: * UtilMEJBTest.java
043: * JUnit based test
044: *
045: * Created on May 20, 2004, 3:12 PM
046: */
047:
048: package org.netbeans.modules.j2ee.sun.share.management;
049:
050: //import javax.management.*;
051: //import javax.management.j2ee.Management;
052: //import javax.management.j2ee.ManagementHome;
053: //import javax.management.remote.JMXConnector;
054: //import javax.management.remote.JMXServiceURL;
055: import javax.management.MBeanServerConnection; //import javax.management.MBeanException;
056: //import javax.management.ReflectionException;
057: //import javax.management.IntrospectionException;
058: //import javax.management.InstanceNotFoundException;
059: //import javax.management.AttributeNotFoundException;
060: //import javax.management.InvalidAttributeValueException;
061: //import java.io.File;
062: //import javax.swing.JOptionPane;
063: //import java.util.Set;
064: //import java.util.Arrays;
065: //import java.util.HashSet;
066: //import java.util.Hashtable;
067: //import javax.naming.*;
068: //import javax.rmi.PortableRemoteObject;
069: //import java.util.Iterator;
070: //import java.util.Properties;
071: //import javax.enterprise.deploy.spi.DeploymentManager;
072: //import java.rmi.RemoteException;
073: //import com.sun.enterprise.admin.jmx.remote.DefaultConfiguration;
074: //import com.sun.enterprise.admin.jmx.remote.SunOneHttpJmxConnectorFactory;
075: //import com.sun.enterprise.deployment.util.DeploymentProperties;
076: //import org.netbeans.modules.j2ee.sun.ide.j2ee.mbmapping.*;
077: //import org.netbeans.modules.j2ee.sun.ide.j2ee.runtime.nodes.Constants;
078: //import org.netbeans.modules.j2ee.sun.ide.j2ee.DeploymentManagerProperties;
079: //import org.netbeans.modules.j2ee.sun.share.SunDeploymentManagerInterface;
080: import junit.framework.*;
081:
082: import org.netbeans.modules.j2ee.sun.share.management.UtilMEJB;
083:
084: /**
085: *
086: * @author vkraemer
087: */
088: public class UtilMEJBTest extends TestCase {
089:
090: public void testCreate() {
091: UtilMEJB foo = new UtilMEJB("iasengsol7.red.iplanet.com", 4849,
092: "admin", "adminadmin");
093: MBeanServerConnection bar = foo.getConnection();
094: foo.getServerName();
095:
096: }
097:
098: public UtilMEJBTest(java.lang.String testName) {
099: super (testName);
100: }
101:
102: }
103:
104: /**
105: * Test of getServerName method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
106: *
107: public void testGetServerName() {
108: System.out.println("testGetServerName");
109:
110: // TODO add your test code below by replacing the default call to fail.
111: fail("The test case is empty.");
112: }
113:
114: /**
115: * Test of getConnection method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
116: *
117: public void testGetConnection() {
118: System.out.println("testGetConnection");
119:
120: // TODO add your test code below by replacing the default call to fail.
121: fail("The test case is empty.");
122: }
123:
124:
125: /**
126: * Test of updateGetAttributes method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
127: *
128: public void testUpdateGetAttributes() {
129: System.out.println("testUpdateGetAttributes");
130:
131: // TODO add your test code below by replacing the default call to fail.
132: fail("The test case is empty.");
133: }
134:
135: /**
136: * Test of updateGetAttribute method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
137: *
138: public void testUpdateGetAttribute() {
139: System.out.println("testUpdateGetAttribute");
140:
141: // TODO add your test code below by replacing the default call to fail.
142: fail("The test case is empty.");
143: }
144:
145: /**
146: * Test of updateInvoke method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
147: *
148: public void testUpdateInvoke() {
149: System.out.println("testUpdateInvoke");
150:
151: // TODO add your test code below by replacing the default call to fail.
152: fail("The test case is empty.");
153: }
154:
155: /**
156: * Test of queryServer method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
157: *
158: public void testQueryServer() {
159: System.out.println("testQueryServer");
160:
161: // TODO add your test code below by replacing the default call to fail.
162: fail("The test case is empty.");
163: }
164:
165: /**
166: * Test of updateMBeanInfo method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
167: *
168: public void testUpdateMBeanInfo() {
169: System.out.println("testUpdateMBeanInfo");
170:
171: // TODO add your test code below by replacing the default call to fail.
172: fail("The test case is empty.");
173: }
174:
175: /**
176: * Test of updateSetAttribute method, of class org.netbeans.modules.j2ee.sun.share.management.UtilMEJB.
177: *
178: public void testUpdateSetAttribute() {
179: System.out.println("testUpdateSetAttribute");
180:
181: // TODO add your test code below by replacing the default call to fail.
182: fail("The test case is empty.");
183: }
184:
185: // TODO add test methods here, they have to start with 'test' name.
186: // for example:
187: // public void testHello() {}
188:
189:
190: }*/
|