[jboss-cvs] JBossAS SVN: r66012 - in trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785: unit and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 10 11:28:15 EDT 2007
Author: ALRubinger
Date: 2007-10-10 11:28:15 -0400 (Wed, 10 Oct 2007)
New Revision: 66012
Modified:
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java
Log:
EJBTHREE-785: Fixed Unit Test, Formatted
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java 2007-10-10 14:35:54 UTC (rev 66011)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java 2007-10-10 15:28:15 UTC (rev 66012)
@@ -21,18 +21,16 @@
*/
package org.jboss.ejb3.test.ejbthree785;
-import javax.ejb.Stateless;
-
/**
* This one implements the business interface.
*
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
* @version $Revision$
*/
- at Stateless
-public class AbstractStatelessBean implements MyStatelessRemote,
- MyStatelessLocal {
- public String sayHiTo(String name) {
- return "Hi " + name;
- }
+public class AbstractStatelessBean implements MyStatelessRemote, MyStatelessLocal
+{
+ public String sayHiTo(String name)
+ {
+ return "Hi " + name;
+ }
}
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java 2007-10-10 14:35:54 UTC (rev 66011)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java 2007-10-10 15:28:15 UTC (rev 66012)
@@ -27,6 +27,7 @@
* @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
* @version $Revision: $
*/
-public interface MyStateless {
+public interface MyStateless
+{
String sayHiTo(String name);
}
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java 2007-10-10 14:35:54 UTC (rev 66011)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java 2007-10-10 15:28:15 UTC (rev 66012)
@@ -21,6 +21,7 @@
*/
package org.jboss.ejb3.test.ejbthree785;
+import javax.ejb.Stateless;
/**
* Comment
@@ -29,8 +30,8 @@
* @author <a href="mailto:alr at alrubinger.com">ALR</a>
* @version $Revision$
*/
-
+ at Stateless
public class MyStatelessBean extends AbstractStatelessBean
{
-
+
}
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java 2007-10-10 14:35:54 UTC (rev 66011)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessRemote.java 2007-10-10 15:28:15 UTC (rev 66012)
@@ -34,6 +34,7 @@
*/
@Remote
@RemoteBinding(jndiBinding = MyStatelessRemote.JNDI_NAME_REMOTE)
-public interface MyStatelessRemote extends MyStateless {
+public interface MyStatelessRemote extends MyStateless
+{
public static final String JNDI_NAME_REMOTE = "MyStatelessBean/remote";
}
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java 2007-10-10 14:35:54 UTC (rev 66011)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/Tester.java 2007-10-10 15:28:15 UTC (rev 66012)
@@ -12,8 +12,9 @@
@Remote
@RemoteBinding(jndiBinding = Tester.JNDI_NAME_REMOTE)
-public interface Tester {
- public static final String JNDI_NAME_REMOTE = "TesterBean/remote";
+public interface Tester
+{
+ public static final String JNDI_NAME_REMOTE = "TesterBean/remote";
- String sayHiTo(String name);
+ String sayHiTo(String name);
}
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java 2007-10-10 14:35:54 UTC (rev 66011)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java 2007-10-10 15:28:15 UTC (rev 66012)
@@ -10,12 +10,14 @@
import javax.ejb.Stateless;
@Stateless
-public class TesterBean implements Tester {
+public class TesterBean implements Tester
+{
- @EJB
- private MyStatelessLocal local;
+ @EJB
+ private MyStatelessLocal local;
- public String sayHiTo(String name) {
- return local.sayHiTo(name);
- }
+ public String sayHiTo(String name)
+ {
+ return local.sayHiTo(name);
+ }
}
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java 2007-10-10 14:35:54 UTC (rev 66011)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java 2007-10-10 15:28:15 UTC (rev 66012)
@@ -37,59 +37,61 @@
* @author <a href="mailto:alr at alrubinger.com">ALR</a>
* @version $Revision$
*/
-public class SuperBeanTesterUnitTestCase extends JBossTestCase {
+public class SuperBeanTesterUnitTestCase extends JBossTestCase
+{
- public SuperBeanTesterUnitTestCase(String name) {
- super(name);
- }
+ public SuperBeanTesterUnitTestCase(String name)
+ {
+ super(name);
+ }
- /**
- * Ensures that a remote view of a business interface implemented by a
- * superclass of an EJB's Implementation Class is deployed and invokable
- *
- * @throws Exception
- */
- public void testSuperRemoteInvokable() throws Exception {
- MyStatelessRemote session = (MyStatelessRemote) getInitialContext()
- .lookup(MyStatelessRemote.JNDI_NAME_REMOTE);
- Date date = new Date();
- String expected = "Hi " + date.toString();
- String actual = session.sayHiTo(date.toString());
- assertEquals(expected, actual);
- }
+ /**
+ * Ensures that a remote view of a business interface implemented by a
+ * superclass of an EJB's Implementation Class is deployed and invokable
+ *
+ * @throws Exception
+ */
+ public void testSuperRemoteInvokable() throws Exception
+ {
+ MyStatelessRemote session = (MyStatelessRemote) getInitialContext().lookup(MyStatelessRemote.JNDI_NAME_REMOTE);
+ Date date = new Date();
+ String expected = "Hi " + date.toString();
+ String actual = session.sayHiTo(date.toString());
+ assertEquals(expected, actual);
+ }
- /**
- * Ensures that a local view of a business interface implemented by a
- * superclass of an EJB's Implementation Class is deployed; won't be
- * invokable as unit test runs in separate JVM
- *
- * @throws Exception
- */
- public void testSuperLocalDeployed() throws Exception {
- MyStatelessLocal session = (MyStatelessLocal) getInitialContext()
- .lookup(MyStatelessLocal.JNDI_NAME_LOCAL);
- assertNotNull(session);
- }
+ /**
+ * Ensures that a local view of a business interface implemented by a
+ * superclass of an EJB's Implementation Class is deployed; won't be
+ * invokable as unit test runs in separate JVM
+ *
+ * @throws Exception
+ */
+ public void testSuperLocalDeployed() throws Exception
+ {
+ MyStatelessLocal session = (MyStatelessLocal) getInitialContext().lookup(MyStatelessLocal.JNDI_NAME_LOCAL);
+ assertNotNull(session);
+ }
- /**
- * Ensures that dependencies may be made upon EJBs with
- *
- * @Local implemented by superclass of an EJB's Implementation Class, and
- * that invocation succeeds.
- *
- * @throws Exception
- */
- public void testSuperLocalViaRemoteDelegate() throws Exception {
- Tester session = (Tester) getInitialContext().lookup(
- Tester.JNDI_NAME_REMOTE);
- Date date = new Date();
- String expected = "Hi " + date.toString();
- String actual = session.sayHiTo(date.toString());
- assertEquals(expected, actual);
- }
+ /**
+ * Ensures that dependencies may be made upon EJBs with
+ *
+ * @Local implemented by superclass of an EJB's Implementation Class, and
+ * that invocation succeeds.
+ *
+ * @throws Exception
+ */
+ public void testSuperLocalViaRemoteDelegate() throws Exception
+ {
+ Tester session = (Tester) getInitialContext().lookup(Tester.JNDI_NAME_REMOTE);
+ Date date = new Date();
+ String expected = "Hi " + date.toString();
+ String actual = session.sayHiTo(date.toString());
+ assertEquals(expected, actual);
+ }
- public static Test suite() throws Exception {
- return getDeploySetup(SuperBeanTesterUnitTestCase.class,
- "ejbthree785.jar");
- }
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(SuperBeanTesterUnitTestCase.class, "ejbthree785.jar");
+ }
}
More information about the jboss-cvs-commits
mailing list