User: patriot1burke
Date: 03/03/31 13:54:52
Modified: src/main/org/jboss/test/aop/test AOPUnitTestCase.java
Log:
added some exception testing
Revision Changes Path
1.8 +22 -11 jbosstest/src/main/org/jboss/test/aop/test/AOPUnitTestCase.java
Index: AOPUnitTestCase.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/test/AOPUnitTestCase.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AOPUnitTestCase.java 2 Mar 2003 16:25:25 -0000 1.7
+++ AOPUnitTestCase.java 31 Mar 2003 21:54:52 -0000 1.8
@@ -20,11 +20,11 @@
import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
/**
-* Sample client for the jboss container.
-*
-* @author <a href="mailto:bill@... Burke</a>
-* @version $Id: AOPUnitTestCase.java,v 1.7 2003/03/02 16:25:25 austinchau Exp $
-*/
+ * Sample client for the jboss container.
+ *
+ * @author <a href="mailto:bill@... Burke</a>
+ * @version $Id: AOPUnitTestCase.java,v 1.8 2003/03/31 21:54:52 patriot1burke Exp $
+ */
public class AOPUnitTestCase
extends JBossTestCase
@@ -97,7 +97,7 @@
public void testMethodInterception() throws Exception
- {
+ {
String serverName = InetAddress.getLocalHost().getHostName();
String connectorName = "jmx:" + serverName + ":rmi";
RMIAdaptor server = (RMIAdaptor)new InitialContext().lookup(connectorName);
@@ -105,10 +105,10 @@
Object[] params = {};
String[] sig = {};
server.invoke(testerName, "testMethodInterception", params, sig);
- }
+ }
public void testConstructorInterception() throws Exception
- {
+ {
String serverName = InetAddress.getLocalHost().getHostName();
String connectorName = "jmx:" + serverName + ":rmi";
RMIAdaptor server = (RMIAdaptor)new InitialContext().lookup(connectorName);
@@ -116,13 +116,24 @@
Object[] params = {};
String[] sig = {};
server.invoke(testerName, "testConstructorInterception", params, sig);
- }
+ }
+
+ public void testExceptions() throws Exception
+ {
+ String serverName = InetAddress.getLocalHost().getHostName();
+ String connectorName = "jmx:" + serverName + ":rmi";
+ RMIAdaptor server = (RMIAdaptor)new InitialContext().lookup(connectorName);
+ ObjectName testerName = new ObjectName("jboss.aop:name=AOPTester");
+ Object[] params = {};
+ String[] sig = {};
+ server.invoke(testerName, "testExceptions", params, sig);
+ }
public static Test suite() throws Exception
{
/*
- Test t1 = getDeploySetup(AOPUnitTestCase.class, "aoptest.aop");
- return getDeploySetup(t1, "aoptest.sar");
+ Test t1 = getDeploySetup(AOPUnitTestCase.class, "aoptest.aop");
+ return getDeploySetup(t1, "aoptest.sar");
*/
return getDeploySetup(AOPUnitTestCase.class, "aoptest.sar");
}
|