[jboss-cvs] JBossAS SVN: r65530 - 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
Fri Sep 21 10:02:28 EDT 2007


Author: wolfc
Date: 2007-09-21 10:02:27 -0400 (Fri, 21 Sep 2007)
New Revision: 65530

Added:
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/
   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/TesterBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java
Modified:
   trunk/ejb3/build-test.xml
Log:
EJBTHREE-785: unit test

Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml	2007-09-21 13:04:38 UTC (rev 65529)
+++ trunk/ejb3/build-test.xml	2007-09-21 14:02:27 UTC (rev 65530)
@@ -1925,6 +1925,10 @@
       </jar>
    </target>
 
+   <target name="ejbthree785" depends="compile-classes">
+      <build-simple-jar name="ejbthree785"/>
+   </target>
+   
    <target name="ejbthree832"
       description="Builds all jar files."
       depends="compile-classes">
@@ -3643,7 +3647,9 @@
    
    <target name="jars" depends="defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, appclient, tck5sec, invalidtxmdb, descriptortypo, libdeployment, homeinterface, timestampentity, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
       circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ear, ejbthree440,
-      ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751, ejbthree832, ejbthree921, ejbthree936,
+      ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751,
+      ejbthree785, 
+      ejbthree832, ejbthree921, ejbthree936,
       ejbthree939,
       ejbthree953, ejbthree957, ejbthree959, ejbthree963, ejbthree967, ejbthree971, ejbthree973, ejbthree985, ejbthree986,
       ejbthree989, ejbthree1020, ejbthree1023, ejbthree1025, ejbthree1040,
@@ -4529,6 +4535,9 @@
          <param name="test" value="ejbthree751"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
+         <param name="test" value="ejbthree785"/>
+      </antcall>
+      <antcall target="test" inheritRefs="true">
          <param name="test" value="ejbthree832"/>
       </antcall>
       <antcall target="test" inheritRefs="true">

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java	2007-09-21 14:02:27 UTC (rev 65530)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.ejbthree785;
+
+/**
+ * This one implements the business interface.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class AbstractStatelessBean implements MyStateless
+{
+   public String sayHiTo(String name)
+   {
+      return "Hi " + name;
+   }
+}


Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/AbstractStatelessBean.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java	2007-09-21 14:02:27 UTC (rev 65530)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.ejbthree785;
+
+import javax.ejb.Local;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Local
+public interface MyStateless
+{
+   String sayHiTo(String name);
+}


Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStateless.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java	2007-09-21 14:02:27 UTC (rev 65530)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.ejbthree785;
+
+import javax.ejb.Stateless;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+public class MyStatelessBean extends AbstractStatelessBean
+{
+
+}


Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/MyStatelessBean.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java	2007-09-21 14:02:27 UTC (rev 65530)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.ejbthree785;
+
+import javax.ejb.EJB;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(value=MyStateless.class)
+public class TesterBean
+{
+   @EJB(beanName="MyStatelessBean") 
+   private MyStateless delegate;
+   
+   public String sayHiTo(String name)
+   {
+      return delegate.sayHiTo(name);
+   }
+}


Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/TesterBean.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java	2007-09-21 14:02:27 UTC (rev 65530)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.ejbthree785.unit;
+
+import java.util.Date;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree785.MyStateless;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Test to see if a super can have the business interface.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class SuperBeanTesterUnitTestCase extends JBossTestCase
+{
+
+   public SuperBeanTesterUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testSuper() throws Exception
+   {
+      MyStateless session = (MyStateless) getInitialContext().lookup("TesterBean/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");
+   }
+}


Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree785/unit/SuperBeanTesterUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list