[jboss-cvs] JBossAS SVN: r65894 - trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 5 14:10:07 EDT 2007
Author: ALRubinger
Date: 2007-10-05 14:10:07 -0400 (Fri, 05 Oct 2007)
New Revision: 65894
Added:
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeUnitTestCase.java
Removed:
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeTest.java
Log:
Renamed to fit JUnit naming conventions
Deleted: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeTest.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeTest.java 2007-10-05 17:46:17 UTC (rev 65893)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeTest.java 2007-10-05 18:10:07 UTC (rev 65894)
@@ -1,67 +0,0 @@
-/*
- * JBoss, the OpenSource J2EE webOS
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.ejb3.test.ejbthree1058.unit;
-
-import javax.ejb.EJBObject;
-import javax.ejb.NoSuchEJBException;
-import javax.rmi.PortableRemoteObject;
-
-import junit.framework.Test;
-
-import org.jboss.ejb3.test.ejbthree1058.StatefulRemote;
-import org.jboss.test.JBossTestCase;
-
-/**
- * A InvokeEjbObjectMethodWithoutHomeTest.
- *
- * @author <a href="andrew.rubinger at redhat.com">ALR</a>
- * @version $Revision: $
- */
-public class InvokeEjbObjectMethodWithoutHomeTest extends JBossTestCase
-{
- public InvokeEjbObjectMethodWithoutHomeTest(String name)
- {
- super(name);
- }
-
- /**
- * Attempts to invoke an EJBObject Method on an EJB with a Remote interface defined, but no home interface
- *
- * @throws Exception
- */
- public void testInvokeRemoveOnEjbObjectWithoutHome() throws Exception
- {
- // Obtain stub
- Object obj = getInitialContext().lookup(StatefulRemote.JNDI_NAME_REMOTE);
- StatefulRemote session = (StatefulRemote) PortableRemoteObject.narrow(obj, StatefulRemote.class);
- EJBObject ejbObject = (EJBObject) obj;
-
- // Ensure EJBObject
- assertTrue(session instanceof EJBObject);
-
- // Cast and remove appropriately, ensuring removed
- boolean removed = false;
- String result = session.test();
- assertEquals(StatefulRemote.TEST_STRING, result);
- ejbObject.remove();
- try
- {
- session.test();
- }
- catch (NoSuchEJBException nsee)
- {
- removed = true;
- }
- assertTrue(removed);
-
- }
-
- public static Test suite() throws Exception
- {
- return getDeploySetup(InvokeEjbObjectMethodWithoutHomeTest.class, "ejbthree1058.jar");
- }
-}
Copied: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeUnitTestCase.java (from rev 65889, trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeTest.java)
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeUnitTestCase.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeUnitTestCase.java 2007-10-05 18:10:07 UTC (rev 65894)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.ejb3.test.ejbthree1058.unit;
+
+import javax.ejb.EJBObject;
+import javax.ejb.NoSuchEJBException;
+import javax.rmi.PortableRemoteObject;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree1058.StatefulRemote;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * A InvokeEjbObjectMethodWithoutHomeTest.
+ *
+ * @author <a href="andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class InvokeEjbObjectMethodWithoutHomeUnitTestCase extends JBossTestCase
+{
+ public InvokeEjbObjectMethodWithoutHomeUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Attempts to invoke an EJBObject Method on an EJB with a Remote interface defined, but no home interface
+ *
+ * @throws Exception
+ */
+ public void testInvokeRemoveOnEjbObjectWithoutHome() throws Exception
+ {
+ // Obtain stub
+ Object obj = getInitialContext().lookup(StatefulRemote.JNDI_NAME_REMOTE);
+ StatefulRemote session = (StatefulRemote) PortableRemoteObject.narrow(obj, StatefulRemote.class);
+ EJBObject ejbObject = (EJBObject) obj;
+
+ // Ensure EJBObject
+ assertTrue(session instanceof EJBObject);
+
+ // Cast and remove appropriately, ensuring removed
+ boolean removed = false;
+ String result = session.test();
+ assertEquals(StatefulRemote.TEST_STRING, result);
+ ejbObject.remove();
+ try
+ {
+ session.test();
+ }
+ catch (NoSuchEJBException nsee)
+ {
+ removed = true;
+ }
+ assertTrue(removed);
+
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(InvokeEjbObjectMethodWithoutHomeUnitTestCase.class, "ejbthree1058.jar");
+ }
+}
Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1058/unit/InvokeEjbObjectMethodWithoutHomeUnitTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the jboss-cvs-commits
mailing list