[jboss-cvs] JBossAS SVN: r72731 - in trunk/testsuite: imports/sections and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 25 10:29:40 EDT 2008


Author: scott.stark at jboss.org
Date: 2008-04-25 10:29:40 -0400 (Fri, 25 Apr 2008)
New Revision: 72731

Added:
   trunk/testsuite/imports/sections/ejb3.xml
   trunk/testsuite/src/main/org/jboss/test/ejb3/
   trunk/testsuite/src/main/org/jboss/test/ejb3/basic/
   trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSession.java
   trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSessionBean.java
   trunk/testsuite/src/main/org/jboss/test/ejb3/test/
   trunk/testsuite/src/main/org/jboss/test/ejb3/test/SimpleSessionUnitTestCase.java
Modified:
   trunk/testsuite/imports/test-jars.xml
Log:
Start ejb3 specific integration tests

Added: trunk/testsuite/imports/sections/ejb3.xml
===================================================================
--- trunk/testsuite/imports/sections/ejb3.xml	                        (rev 0)
+++ trunk/testsuite/imports/sections/ejb3.xml	2008-04-25 14:29:40 UTC (rev 72731)
@@ -0,0 +1,13 @@
+<project name="tests-ejb3-jars">
+	<target name="_jars-ejb3">
+		<mkdir dir="${build.lib}" />
+
+		<!-- A jar with a simple ejb3 session -->
+		<jar destfile="${build.lib}/simple-session.jar">
+			<fileset dir="${build.classes}">
+				<include name="org/jboss/test/ejb3/basic/**" />
+			</fileset>
+		</jar>
+
+	</target>
+</project>

Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml	2008-04-25 14:28:33 UTC (rev 72730)
+++ trunk/testsuite/imports/test-jars.xml	2008-04-25 14:29:40 UTC (rev 72731)
@@ -22,6 +22,7 @@
    <import file="sections/deadlock.xml"/>
    <import file="sections/deployers.xml"/>
    <import file="sections/ee5client.xml"/>
+   <import file="sections/ejb3.xml"/>
    <import file="sections/ejbconf.xml"/>
    <import file="sections/entity.xml"/>
    <import file="sections/exception.xml"/>

Added: trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSession.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSession.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSession.java	2008-04-25 14:29:40 UTC (rev 72731)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * 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.test.ejb3.basic;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public interface SimpleSession
+{
+   public void ping();
+}

Added: trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSessionBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSessionBean.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/basic/SimpleSessionBean.java	2008-04-25 14:29:40 UTC (rev 72731)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * 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.test.ejb3.basic;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+ at Stateless(mappedName="ejb3/basic/SimpleSessionBean")
+ at Remote(SimpleSession.class)
+public class SimpleSessionBean
+   implements SimpleSession
+{
+   public void ping()
+   {
+      System.out.println("pinged");
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/ejb3/test/SimpleSessionUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/test/SimpleSessionUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/test/SimpleSessionUnitTestCase.java	2008-04-25 14:29:40 UTC (rev 72731)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * 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.test.ejb3.test;
+
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.ejb3.basic.SimpleSession;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class SimpleSessionUnitTestCase
+   extends JBossTestCase
+{
+   public static Test suite() throws Exception
+   {
+      Test t1 = getDeploySetup(SimpleSessionUnitTestCase.class, "simple-session.jar");
+      return t1;
+   }
+
+   public SimpleSessionUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testSession()
+      throws Exception
+   {
+      InitialContext ctx = getInitialContext();
+      Object ref = ctx.lookup("ejb3/basic/SimpleSessionBean/remote");
+      SimpleSession test = (SimpleSession) ref;
+      test.ping();
+   }
+}




More information about the jboss-cvs-commits mailing list