You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2006/10/25 20:57:52 UTC

svn commit: r467731 - in /incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful: StatefulLocalTestSuite.java StatefulPojoHomeIntfcTests.java StatefulPojoLocalHomeIntfcTests.java StatefulTestSuite.java

Author: dblevins
Date: Wed Oct 25 11:57:51 2006
New Revision: 467731

URL: http://svn.apache.org/viewvc?view=rev&rev=467731
Log:
Patch from Mohammad Nour, OPENEJB-173: iTest: StatefulHomeIntfcTests
Thanks Mohammad!

Added:
    incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoHomeIntfcTests.java
    incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoLocalHomeIntfcTests.java
Modified:
    incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java
    incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java

Modified: incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java?view=diff&rev=467731&r1=467730&r2=467731
==============================================================================
--- incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java Wed Oct 25 11:57:51 2006
@@ -37,6 +37,8 @@
         suite.addTest(new StatefulJndiTests());
         suite.addTest(new StatefulPojoLocalJndiTests());
         suite.addTest(new StatefulHomeIntfcTests());
+        suite.addTest(new StatefulPojoHomeIntfcTests());
+        suite.addTest(new StatefulPojoLocalHomeIntfcTests());
         suite.addTest(new StatefulLocalBusinessIntfcTests());
         suite.addTest(new StatefulRemoteBusinessIntfcTests());
         suite.addTest(new StatefulEjbHomeTests());

Added: incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoHomeIntfcTests.java?view=auto&rev=467731
==============================================================================
--- incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoHomeIntfcTests.java Wed Oct 25 11:57:51 2006
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatefulTestClients
+ * 
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ */
+public class StatefulPojoHomeIntfcTests extends BasicStatefulTestClient {
+
+    public StatefulPojoHomeIntfcTests(){
+        super("PojoHomeIntfc.");
+    }
+    
+    protected void setUp() throws Exception{
+        super.setUp();
+        Object obj = initialContext.lookup("client/tests/stateful/BasicStatefulPojoHome");
+        ejbHome = (BasicStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatefulHome.class);
+    }
+    
+    //===============================
+    // Test home interface methods
+    //
+    public void test01_create(){
+        try{
+            ejbObject = ejbHome.create("First Bean");
+            assertNotNull("The EJBObject is null", ejbObject);
+        } catch (Exception e){
+            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+        }
+    }
+    //
+    // Test home interface methods
+    //===============================
+
+}

Added: incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoLocalHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoLocalHomeIntfcTests.java?view=auto&rev=467731
==============================================================================
--- incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoLocalHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulPojoLocalHomeIntfcTests.java Wed Oct 25 11:57:51 2006
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatefulTestClients
+ * 
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ */
+public class StatefulPojoLocalHomeIntfcTests extends BasicStatefulLocalTestClient {
+
+    public StatefulPojoLocalHomeIntfcTests(){
+        super("PojoLocalHomeIntfc.");
+    }
+    
+    protected void setUp() throws Exception{
+        super.setUp();
+        ejbLocalHome = (BasicStatefulLocalHome) initialContext.lookup("client/tests/stateful/BasicStatefulPojoHomeLocal");
+    }
+    
+    //===============================
+    // Test home interface methods
+    //
+    public void test01_create(){
+        try{
+            ejbLocalObject = ejbLocalHome.create("First Bean");
+            assertNotNull("The EJBLocalObject is null", ejbLocalObject);
+        } catch (Exception e){
+            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+        }
+    }
+    //
+    // Test home interface methods
+    //===============================
+
+}

Modified: incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java?view=diff&rev=467731&r1=467730&r2=467731
==============================================================================
--- incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/openejb-itests/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java Wed Oct 25 11:57:51 2006
@@ -35,6 +35,7 @@
         suite.addTest(new StatefulJndiTests());
         suite.addTest(new StatefulPojoRemoteJndiTests());
         suite.addTest(new StatefulHomeIntfcTests());
+        suite.addTest(new StatefulPojoHomeIntfcTests());
         suite.addTest(new StatefulRemoteBusinessIntfcTests());
         suite.addTest(new StatefulEjbHomeTests());
         suite.addTest(new StatefulEjbObjectTests());