User: cgjung
Date: 02/04/19 00:47:25
Modified:jboss.net/testsuite/src/main/org/jboss/test/net/jmx
WSRJMXAccessUnitTestCase.java
Log:
axis.jar in jboss-net.jar. cleanup of JMX tests.
Revision ChangesPath
1.5 +1 -160
contrib/jboss.net/testsuite/src/main/org/jboss/test/net/jmx/WSRJMXAccessUnitTestCase.java
Index: WSRJMXAccessUnitTestCase.java
===
RCS file:
/cvsroot/jboss/contrib/jboss.net/testsuite/src/main/org/jboss/test/net/jmx/WSRJMXAccessUnitTestCase.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WSRJMXAccessUnitTestCase.java 10 Apr 2002 09:58:10 - 1.4
+++ WSRJMXAccessUnitTestCase.java 19 Apr 2002 07:47:25 - 1.5
@@ -1,160 +1 @@
-
-/*
- * JBoss, the OpenSource J2EE webOS
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-// $Id: WSRJMXAccessUnitTestCase.java,v 1.4 2002/04/10 09:58:10 cgjung Exp $
-package org.jboss.test.net.jmx;
-
-
-
-import org.jboss.net.axis.AxisInvocationHandler;
-import org.jboss.net.jmx.MBeanInvocationHandler;
-import org.jboss.net.jmx.adaptor.RemoteAdaptor;
-import org.jboss.net.jmx.adaptor.RemoteAdaptorInvocationHandler;
-import org.jboss.net.jmx.MBeanInvocationHandler;
-import org.jboss.test.net.AxisTestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import javax.management.ObjectName;
-import java.net.URL;
-
-
-/**
- * Tests remote accessibility of JMX MBean through the web service
- * @created 29 March
- * @author a href=mailto:[EMAIL PROTECTED];Peter Braswell/a
- * @version $Revision: 1.4 $
- */
-
-public class WSRJMXAccessUnitTestCase
- extends AxisTestCase
-{
-
- /**
-* Method setUp
-*
-*
-* @throws Exception
-*
-*/
-
- public void setUp ()
- throws Exception
- {
- super.setUp();
-
- }
-
- public void testGetter( )
- {
- System.out.println(/* begin test: testGetter() */);
- System.out.println(Invoking MBean at ENDPOINT: + JMX_END_POINT );
- try
- {
- MBeanInvocationHandler handler =
- createMBeanInvocationHandler(new URL(JMX_END_POINT));
- String str =
- ( String ) handler.invoke(jboss.net:service=JMXTestMBean, //
serviceName
-getTestString, // methodName
-null, // arguments
-null); // classes
- assertEquals( str,JMX_TEST_STRING);
- }
- catch(Exception ex)
- {
- ex.printStackTrace();
- }
- System.out.println(/* end test: testGetter() */);
- }
-
- public void testSetter( )
- {
- System.out.println(/* begin test: testSetter() */);
- System.out.println(Invoking MBean at ENDPOINT: + JMX_END_POINT );
- try
- {
- MBeanInvocationHandler handler =
- createMBeanInvocationHandler(new URL(JMX_END_POINT));
- handler.invoke(jboss.net:service=JMXTestMBean, // serviceName
-setTestString,// methodName
-new String[] {foo-dog}, // arguments
-new Class[] {String.class});
// classes
- // invoke the getter and compare the answer with the
- // set string value
- String str =
-(String) handler.invoke(jboss.net:service=JMXTestMBean,
// serviceName
-getTestString,// methodName
-null, // arguments
-null); // classes
- System.out.println(Checking: + str + == + 'foo-dog'?);
- assertEquals( str, foo-dog);
- }
- catch(Exception ex)
- {
- ex.printStackTrace();
- }
- System.out.println(/* end test: testGetter() */);
- }
-
- public void testMethodInvoke( )
- {
- System.out.println(/* begin test: testMethodInvoke() */);
- System.out.println(Invoking MBean at ENDPOINT: + JMX_END_POINT );
- try
- {
- MBeanInvocationHandler handler =
- createMBeanInvocationHandler(new URL(JMX_END_POINT));
- handler.invoke(jboss.net:service=JMXTestMBean, // serviceName
- noopOperation, // methodName
-null, // arguments
-null); // classes