[jboss-cvs] JBossAS SVN: r68150 - in trunk/ejb3: src/test/org/jboss/ejb3/test and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 11 16:48:01 EST 2007
Author: ALRubinger
Date: 2007-12-11 16:48:01 -0500 (Tue, 11 Dec 2007)
New Revision: 68150
Added:
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1155/
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1155/unit/
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1155/unit/MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase.java
Modified:
trunk/ejb3/build-test.xml
Log:
[EJBTHREE-1155] Added Unit Tests
Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml 2007-12-11 21:47:30 UTC (rev 68149)
+++ trunk/ejb3/build-test.xml 2007-12-11 21:48:01 UTC (rev 68150)
@@ -2245,6 +2245,10 @@
<target name="ejbthree1154" depends="compile-classes">
<build-simple-jar name="ejbthree1154"/>
</target>
+
+ <target name="ejbthree1155" depends="compile-classes">
+ <build-simple-jar name="ejbthree1155"/>
+ </target>
<target name="jbas4489"
description="Builds a simple jar files."
@@ -3866,7 +3870,7 @@
ejbthree1057, ejbthree1060,
ejbthree1062,
ejbthree1066, ejbthree1071, ejbthree1075, ejbthree1082, ejbthree1090, ejbthree1092, ejbthree1119, ejbthree1122, ejbthree1123, ejbthree1127,
- ejbthree1146, ejbthree1154, jaxws, jbas4489,
+ ejbthree1146, ejbthree1154, ejbthree1155, jaxws, jbas4489,
aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency,
securitydomain, enventry, security5,
jms/managed, naming, bmt, jca/inflowmdb, pool, jms, security, reference21_30, factory, dd/web, txexceptions,
@@ -4867,6 +4871,9 @@
<param name="test" value="ejbthree1154"/>
</antcall>
<antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1155"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="statelesscreation"/>
</antcall>
<antcall target="test" inheritRefs="true">
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1155/unit/MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1155/unit/MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1155/unit/MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase.java 2007-12-11 21:48:01 UTC (rev 68150)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1155.unit;
+
+import javax.rmi.PortableRemoteObject;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree1155.TestHome;
+import org.jboss.ejb3.test.ejbthree1155.TestRemote1;
+import org.jboss.ejb3.test.ejbthree1155.TestRemote2;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * A Test to ensure that an EJB with many 2.1 Local/Remote interfaces
+ * not explicitly-defined can be properly returned from the "create"
+ * methods of the Home interfaces
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase extends JBossTestCase
+{
+ // Constructor
+
+ public MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ // Suite
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase.class, "ejbthree1155.jar");
+ }
+
+ // Tests
+
+ /**
+ * Tests Remote Interface 1 from a Home create<METHOD>() method
+ */
+ public void testRemoteInterface1FromHomeCreate() throws Exception
+ {
+ // Initialize
+ TestHome home = null;
+
+ // Lookup Home
+ home = (TestHome) PortableRemoteObject
+ .narrow(this.getInitialContext().lookup(TestHome.JNDI_NAME), TestHome.class);
+
+ // Get 2.1 View
+ TestRemote1 ejb = home.createRemote1();
+
+ // Invoke
+ ejb.test1();
+
+ // Remove
+ ejb.remove();
+ }
+
+ /**
+ * Tests Remote Interface 2 from a Home create<METHOD>() method
+ */
+ public void testRemoteInterface2FromHomeCreate() throws Exception
+ {
+ // Initialize
+ TestHome home = null;
+
+ // Lookup Home
+ home = (TestHome) PortableRemoteObject
+ .narrow(this.getInitialContext().lookup(TestHome.JNDI_NAME), TestHome.class);
+
+ // Get 2.1 View
+ TestRemote2 ejb = home.createRemote2();
+
+ // Invoke
+ ejb.test2();
+
+ // Remove
+ ejb.remove();
+ }
+}
Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1155/unit/MultipleCreateMethodsDefineMultipleRemoteInterfacesUnitTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the jboss-cvs-commits
mailing list