db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r443483 - in /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete: DeletePersistentAll.java DeleteQueryElements.java
Date Thu, 14 Sep 2006 21:37:14 GMT
Author: mbo
Date: Thu Sep 14 14:37:14 2006
New Revision: 443483

URL: http://svn.apache.org/viewvc?view=rev&rev=443483
Log:
JDO-411: changing delete-by-query test cases such that there are no FK referencing deleted
instances

Modified:
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java?view=diff&rev=443483&r1=443482&r2=443483
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java (original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java Thu
Sep 14 14:37:14 2006
@@ -21,7 +21,7 @@
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
-import org.apache.jdo.tck.pc.company.Person;
+import org.apache.jdo.tck.pc.company.Insurance;
 import org.apache.jdo.tck.query.QueryElementHolder;
 import org.apache.jdo.tck.query.QueryTest;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -58,7 +58,7 @@
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -72,9 +72,9 @@
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "firstname == param",
+        /*WHERE*/       "carrier == param",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  "String param",
         /*IMPORTS*/     null,
@@ -96,43 +96,43 @@
     /** */
     public void testNoParametersAPI() {
         deletePersistentAllByAPIQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[0], null, 5);
+                VALID_QUERIES[0], null, 10);
     }
     
     /** */
     public void testNoParametersSingleString() {
         deletePersistentAllBySingleStringQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[0], null, 5);
+                VALID_QUERIES[0], null, 10);
     }
     
     /** */
     public void testObjectArrayParametersAPI() {
-        Object[] parameters = new Object[] {"emp1First"};
+        Object[] parameters = new Object[] {"Carrier1"};
         deletePersistentAllByAPIQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /** */
     public void testObjectArrayParametersSingleString() {
-        Object[] parameters = new Object[] {"emp1First"};
+        Object[] parameters = new Object[] {"Carrier1"};
         deletePersistentAllBySingleStringQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /** */
     public void testMapParametersAPI() {
         Map parameters = new HashMap();
-        parameters.put("param", "emp1First");
+        parameters.put("param", "Carrier1");
         deletePersistentAllByAPIQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /** */
     public void testMapParametersSingleString() {
         Map parameters = new HashMap();
-        parameters.put("param", "emp1First");
+        parameters.put("param", "Carrier1");
         deletePersistentAllBySingleStringQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /**

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java?view=diff&rev=443483&r1=443482&r2=443483
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java (original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java Thu
Sep 14 14:37:14 2006
@@ -20,8 +20,9 @@
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
+import org.apache.jdo.tck.pc.company.DentalInsurance;
 import org.apache.jdo.tck.pc.company.FullTimeEmployee;
-import org.apache.jdo.tck.pc.company.Person;
+import org.apache.jdo.tck.pc.company.Insurance;
 import org.apache.jdo.tck.query.QueryElementHolder;
 import org.apache.jdo.tck.query.QueryTest;
 import org.apache.jdo.tck.query.result.classes.FullName;
@@ -57,10 +58,10 @@
         /*UNIQUE*/      Boolean.TRUE,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        FullTimeEmployee.class,
+        /*FROM*/        DentalInsurance.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "salary > 10000 & projects.contains(p) & " +
-                        "p.budget > limit",
+        /*WHERE*/       "((FullTimeEmployee)employee).salary > 10000 & " +
+                        "employee.projects.contains(p) & p.budget > limit",
         /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  "BigDecimal limit",
         /*IMPORTS*/     "import org.apache.jdo.tck.pc.company.Project; " +
@@ -79,9 +80,9 @@
         // The query is invalid because it defines a result clause.
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "firstname, lastname", 
+        /*RESULT*/      "carrier", 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -95,8 +96,8 @@
         new QueryElementHolder(
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
-        /*INTO*/        FullName.class, 
-        /*FROM*/        Person.class,
+        /*INTO*/        String.class, 
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -110,9 +111,9 @@
         // and a result class.
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "firstname, lastname", 
-        /*INTO*/        FullName.class, 
-        /*FROM*/        Person.class,
+        /*RESULT*/      "carrier", 
+        /*INTO*/        String.class, 
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -127,13 +128,13 @@
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
-        /*GROUP BY*/    "lastname",
+        /*GROUP BY*/    "carrier",
         /*ORDER BY*/    null,
         /*FROM*/        null,
         /*TO*/          null),
@@ -141,15 +142,15 @@
         // and a grouping clause
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "lastname", 
+        /*RESULT*/      "carrier", 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
-        /*GROUP BY*/    "lastname",
+        /*GROUP BY*/    "carrier",
         /*ORDER BY*/    null,
         /*FROM*/        null,
         /*TO*/          null),
@@ -158,14 +159,14 @@
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
-        /*ORDER BY*/    "lastname",
+        /*ORDER BY*/    "carrier",
         /*FROM*/        null,
         /*TO*/          null),
         // The query is invalid because it defines a range clause.
@@ -173,7 +174,7 @@
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -190,7 +191,7 @@
         /*UNIQUE*/      Boolean.TRUE,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,



Mime
View raw message