db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r383591 - in /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan: FetchPlanQuery.java FetchPlanRefresh.java FetchPlanRetrieve.java
Date Mon, 06 Mar 2006 17:21:38 GMT
Author: clr
Date: Mon Mar  6 09:21:35 2006
New Revision: 383591

URL: http://svn.apache.org/viewcvs?rev=383591&view=rev
Log:
JDO-294 Added refreshAll and retrieveAll methods to tests

Modified:
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanQuery.java
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRefresh.java
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRetrieve.java

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanQuery.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanQuery.java?rev=383591&r1=383590&r2=383591&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanQuery.java
(original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanQuery.java
Mon Mar  6 09:21:35 2006
@@ -57,13 +57,13 @@
         setBothGroup();
         pm.currentTransaction().begin();
         Query query = pm.newQuery(PCRect.class);
-        checkGroups(ASSERTION_FAILED + "after newQuery().getFetchPlan() ", 
+        checkGroups(ASSERTION_FAILED + " after newQuery().getFetchPlan()", 
                 query.getFetchPlan(), bothGroup);
         query.setUnique(true);
         PCRect instance = (PCRect)query.execute();
-        checkBothLoaded(ASSERTION_FAILED, instance);
+        checkBothLoaded(ASSERTION_FAILED + " after query.execute()", instance);
         pm.currentTransaction().commit();
         failOnError();
     }
 
-}
\ No newline at end of file
+}

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRefresh.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRefresh.java?rev=383591&r1=383590&r2=383591&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRefresh.java
(original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRefresh.java
Mon Mar  6 09:21:35 2006
@@ -16,6 +16,8 @@
  
 package org.apache.jdo.tck.api.persistencemanager.fetchplan;
 
+import java.util.Collection;
+import java.util.HashSet;
 import org.apache.jdo.tck.api.persistencemanager.fetchplan.AbstractFetchPlanTest;
 
 import org.apache.jdo.tck.pc.mylib.PCRect;
@@ -56,6 +58,31 @@
         pm.currentTransaction().begin();
         PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
         pm.refresh(instance);
+        checkBothLoaded(ASSERTION_FAILED, instance);
+        pm.currentTransaction().commit();
+        failOnError();
+    }
+    
+    /** */
+    public void testRefreshAllCollection() {
+        setBothGroup();
+        pm.currentTransaction().begin();
+        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
+        Collection instances = new HashSet();
+        instances.add(instance);
+        pm.refreshAll(instances);
+        checkBothLoaded(ASSERTION_FAILED, instance);
+        pm.currentTransaction().commit();
+        failOnError();
+    }
+    
+    /** */
+    public void testRefreshAllArray() {
+        setBothGroup();
+        pm.currentTransaction().begin();
+        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
+        Object[] instances = new Object[]{instance};
+        pm.refreshAll(instances);
         checkBothLoaded(ASSERTION_FAILED, instance);
         pm.currentTransaction().commit();
         failOnError();

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRetrieve.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRetrieve.java?rev=383591&r1=383590&r2=383591&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRetrieve.java
(original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanRetrieve.java
Mon Mar  6 09:21:35 2006
@@ -16,6 +16,8 @@
  
 package org.apache.jdo.tck.api.persistencemanager.fetchplan;
 
+import java.util.Collection;
+import java.util.HashSet;
 import org.apache.jdo.tck.api.persistencemanager.fetchplan.AbstractFetchPlanTest;
 
 import org.apache.jdo.tck.pc.mylib.PCRect;
@@ -50,13 +52,38 @@
     public static void main(String[] args) {
         BatchTestRunner.run(FetchPlanRetrieve.class);
     }
-    
+
     /** */
     public void testRetrieve() {
         setBothGroup();
         pm.currentTransaction().begin();
         PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
         pm.retrieve(instance, true);
+        checkBothLoaded(ASSERTION_FAILED, instance);
+        pm.currentTransaction().commit();
+        failOnError();
+    }
+
+    /** */
+    public void testRetrieveAllCollection() {
+        setBothGroup();
+        pm.currentTransaction().begin();
+        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
+        Collection instances = new HashSet();
+        instances.add(instance);
+        pm.retrieveAll(instances, true);
+        checkBothLoaded(ASSERTION_FAILED, instance);
+        pm.currentTransaction().commit();
+        failOnError();
+    }
+
+    /** */
+    public void testRetrieveAllArray() {
+        setBothGroup();
+        pm.currentTransaction().begin();
+        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
+        Object[] instances = new Object[]{instance};
+        pm.retrieveAll(instances, true);
         checkBothLoaded(ASSERTION_FAILED, instance);
         pm.currentTransaction().commit();
         failOnError();



Mime
View raw message