You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by da...@apache.org on 2007/03/28 00:16:28 UTC

svn commit: r523100 [2/2] - in /incubator/openejb/trunk/openejb3/itests: openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/bmp/ openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ openejb-itests-beans/src/main/resourc...

Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java?view=diff&rev=523100&r1=523099&r2=523100
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java Tue Mar 27 15:16:23 2007
@@ -135,7 +135,6 @@
  * </PRE>
  */
 public class Cmp2AllowedOperationsTests extends BasicCmp2TestClient {
-
     public Cmp2AllowedOperationsTests() {
         super("AllowedOperations.");
     }
@@ -177,17 +176,12 @@
         // Call the business method
         ejbObject.businessMethod("Reverse Me");
 
-//        ejbHome.findByPrimaryKey(null);
-
-        // TO BE FIXED LATER IN PROXIES
-        /*try {
         ejbHome.sum(1, 2);
-        }catch( java.lang.Exception e ) {e.printStackTrace();} */
 
         ejbObject = (BasicCmpObject)ejbHandle.getEJBObject();
 
         ejbHome.findByPrimaryKey((Integer)ejbObject.getPrimaryKey());
-        ejbHome.remove((Integer)ejbObject.getPrimaryKey());
+        ejbHome.remove(ejbObject.getPrimaryKey());
 
         ejbObject = ejbHome.createObject("Fourth Bean");
         ejbHome.findEmptyCollection();
@@ -397,90 +391,6 @@
      * ______________________|__________________________________________________
      * </PRE>
      */
-    public void TODO_test06_ejbFind() {
-        //
-        // This doesn't seem like a valid test
-        //
-        try {
-
-            OperationsPolicy policy = new OperationsPolicy();
-            policy.allow(OperationsPolicy.Context_getEJBHome);
-            policy.allow(OperationsPolicy.Context_getCallerPrincipal);
-            policy.allow(OperationsPolicy.Context_getRollbackOnly);
-            policy.allow(OperationsPolicy.Context_isCallerInRole);
-//        policy.allow( policy.Context_setRollbackOnly );
-            policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env);
-
-            Object expected = policy;
-            Object actual = ejbObject.getAllowedOperationsReport("ejbFind");
-
-            assertNotNull("The OperationsPolicy is null", actual);
-            assertEquals(expected, actual);
-
-        } catch (Exception e) {
-            fail("Received Exception " + e.getClass() + " : " + e.getMessage());
-        }
-    }
-
-    /**
-     * <PRE>
-     * Bean method           | Bean method can perform the following operations
-     * ______________________|__________________________________________________
-     * |
-     * ejbFind*              |  EntityContext methods:
-     * ejbSelect*            |     - getEJBHome
-     * ejbHome               |     - getCallerPrincipal
-     * |     - getRollbackOnly
-     * |     - isCallerInRole
-     * |     - setRollbackOnly
-     * |  JNDI access to java:comp/env
-     * |  Resource manager access
-     * |  Enterprise bean access
-     * ______________________|__________________________________________________
-     * </PRE>
-     */
-    public void TODO_test07_ejbSelect() {
-        //
-        // This doesn't seem like a valid test
-        //
-        try {
-
-            OperationsPolicy policy = new OperationsPolicy();
-            policy.allow(OperationsPolicy.Context_getEJBHome);
-            policy.allow(OperationsPolicy.Context_getCallerPrincipal);
-            policy.allow(OperationsPolicy.Context_getRollbackOnly);
-            policy.allow(OperationsPolicy.Context_isCallerInRole);
-//        policy.allow( OperationsPolicy.Context_setRollbackOnly );
-            policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env);
-
-            Object expected = policy;
-            Object actual = ejbObject.getAllowedOperationsReport("ejbSelect");
-
-            assertNotNull("The OperationsPolicy is null", actual);
-            assertEquals(expected, actual);
-
-        } catch (Exception e) {
-            fail("Received Exception " + e.getClass() + " : " + e.getMessage());
-        }
-    }
-
-    /**
-     * <PRE>
-     * Bean method           | Bean method can perform the following operations
-     * ______________________|__________________________________________________
-     * |
-     * ejbFind*              |  EntityContext methods:
-     * ejbSelect*            |     - getEJBHome
-     * ejbHome               |     - getCallerPrincipal
-     * |     - getRollbackOnly
-     * |     - isCallerInRole
-     * |     - setRollbackOnly
-     * |  JNDI access to java:comp/env
-     * |  Resource manager access
-     * |  Enterprise bean access
-     * ______________________|__________________________________________________
-     * </PRE>
-     */
     public void test08_ejbHome() {
         try {
 
@@ -508,49 +418,6 @@
      * Bean method           | Bean method can perform the following operations
      * ______________________|__________________________________________________
      * |
-     * ejbSelectInEntity*    |  EntityContext methods:
-     * |     - getEJBHome
-     * |     - getCallerPrincipal
-     * |     - getRollbackOnly
-     * |     - isCallerInRole
-     * |     - setRollbackOnly
-     * |     - getEJBObject
-     * |     - getPrimaryKey
-     * |  JNDI access to java:comp/env
-     * |  Resource manager access
-     * |  Enterprise bean access
-     * ______________________|__________________________________________________
-     * </PRE>
-     */
-    public void TODO_test09_ejbSelectInEntity() {
-        try {
-
-            OperationsPolicy policy = new OperationsPolicy();
-            policy.allow(OperationsPolicy.Context_getEJBHome);
-            policy.allow(OperationsPolicy.Context_getCallerPrincipal);
-            policy.allow(OperationsPolicy.Context_getRollbackOnly);
-            policy.allow(OperationsPolicy.Context_isCallerInRole);
-//        policy.allow( OperationsPolicy.Context_setRollbackOnly );
-            policy.allow(OperationsPolicy.Context_getEJBObject);
-            policy.allow(OperationsPolicy.Context_getPrimaryKey);
-            policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env);
-
-            Object expected = policy;
-            Object actual = ejbObject.getAllowedOperationsReport("ejbSelectInEntity");
-
-            assertNotNull("The OperationsPolicy is null", actual);
-            assertEquals(expected, actual);
-
-        } catch (Exception e) {
-            fail("Received Exception " + e.getClass() + " : " + e.getMessage());
-        }
-    }
-
-    /**
-     * <PRE>
-     * Bean method           | Bean method can perform the following operations
-     * ______________________|__________________________________________________
-     * |
      * ejbActivate           |  EntityContext methods:
      * ejbPassivate          |     - getEJBHome
      * |     - getEJBObject
@@ -592,7 +459,7 @@
      * ______________________|__________________________________________________
      * </PRE>
      */
-    public void test11_ejbPassivate() {
+    public void TODO_test11_ejbPassivate() {
         try {
 
             OperationsPolicy policy = new OperationsPolicy();
@@ -674,7 +541,8 @@
      * ______________________|__________________________________________________
      * </PRE>
      */
-    public void test13_ejbStore() {
+    // todo store is never called
+    public void TODO_test13_ejbStore() {
         try {
 
             OperationsPolicy policy = new OperationsPolicy();

Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java?view=diff&rev=523100&r1=523099&r2=523100
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java Tue Mar 27 15:16:23 2007
@@ -72,7 +72,7 @@
         }
     }
 
-    public void Xtest04_ejbHomeMethod() {
+    public void test04_ejbHomeMethod() {
         try {
             assertEquals(8+9, ejbHome.sum(8, 9));
         } catch (Throwable e) {

Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java?view=diff&rev=523100&r1=523099&r2=523100
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java Tue Mar 27 15:16:23 2007
@@ -38,7 +38,7 @@
         this.addTest(new Cmp2HomeHandleTests());
         this.addTest(new Cmp2HandleTests());
         this.addTest(new Cmp2EjbMetaDataTests());
-        //TODO:0:this.addTest(new Cmp2AllowedOperationsTests());
+        this.addTest(new Cmp2AllowedOperationsTests());
         this.addTest(new Cmp2JndiEncTests());
         this.addTest(new Cmp2RmiIiopTests());
         this.addTest(new CmrTestSuite());

Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java?view=diff&rev=523100&r1=523099&r2=523100
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java Tue Mar 27 15:16:23 2007
@@ -73,7 +73,7 @@
         }
     }
 
-    public void Xtest04_ejbHomeMethod() {
+    public void test04_ejbHomeMethod() {
         try {
             assertEquals(8+9, ejbHome.sum(8, 9));
         } catch (Throwable e) {

Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java?view=diff&rev=523100&r1=523099&r2=523100
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java Tue Mar 27 15:16:23 2007
@@ -73,7 +73,7 @@
         }
     }
 
-    public void Xtest04_ejbHomeMethod() {
+    public void test04_ejbHomeMethod() {
         try {
             assertEquals(8+9, ejbHome.sum(8, 9));
         } catch (Throwable e) {