[jboss-cvs] JBossAS SVN: r67915 - trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1146/unit.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Dec 4 19:21:02 EST 2007


Author: ALRubinger
Date: 2007-12-04 19:21:02 -0500 (Tue, 04 Dec 2007)
New Revision: 67915

Added:
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1146/unit/RemoteInterfaceNotExplicitlyDefinedUnitTestCase.java
Log:
[EJBTHREE-1146] Added Unit Test (Currently passes, unexpected)

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1146/unit/RemoteInterfaceNotExplicitlyDefinedUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1146/unit/RemoteInterfaceNotExplicitlyDefinedUnitTestCase.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1146/unit/RemoteInterfaceNotExplicitlyDefinedUnitTestCase.java	2007-12-05 00:21:02 UTC (rev 67915)
@@ -0,0 +1,64 @@
+/*
+ * 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.ejbthree1146.unit;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree1146.TestRemoteBusinessInterface;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Tests that a Stateless EJB without an explicitly-defined 
+ * remote business interface deploys properly
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class RemoteInterfaceNotExplicitlyDefinedUnitTestCase extends JBossTestCase
+{
+   // Constructor
+   public RemoteInterfaceNotExplicitlyDefinedUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   // Suite
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(RemoteInterfaceNotExplicitlyDefinedUnitTestCase.class, "ejbthree1146.jar");
+   }
+
+   // Tests 
+
+   /**
+    * Ensure that the test EJB deploys and can handle invocations
+    */
+   public void testRemoteInterfaceNotExplicitlyDefined() throws Exception
+   {
+      // Lookup EJB
+      TestRemoteBusinessInterface ejb = (TestRemoteBusinessInterface) this.getInitialContext().lookup(
+            TestRemoteBusinessInterface.JNDI_NAME);
+
+      // Invoke on it
+      assertEquals(ejb.test(),TestRemoteBusinessInterface.RETURN_VALUE);
+   }
+}
\ No newline at end of file


Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1146/unit/RemoteInterfaceNotExplicitlyDefinedUnitTestCase.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the jboss-cvs-commits mailing list