db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r677300 - in /db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping: CompletenessTestJPA.java CompletenessTestList.java CompletenessTestMap.java CompletenessTestOrder.java
Date Wed, 16 Jul 2008 15:15:46 GMT
Author: clr
Date: Wed Jul 16 08:15:45 2008
New Revision: 677300

URL: http://svn.apache.org/viewvc?rev=677300&view=rev
Log:
JDO-555 Refactor mapping tests for security

Modified:
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestJPA.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestList.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestMap.java
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestOrder.java

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestJPA.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestJPA.java?rev=677300&r1=677299&r2=677300&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestJPA.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestJPA.java Wed Jul
16 08:15:45 2008
@@ -21,7 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jdo.tck.JDO_Test;
+import org.apache.jdo.tck.AbstractReaderTest;
 import org.apache.jdo.tck.pc.company.CompanyFactoryRegistry;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -40,7 +40,7 @@
  *<B>Assertion Description: </B>
  */
 
-public class CompletenessTestJPA extends JDO_Test {
+public class CompletenessTestJPA extends AbstractReaderTest {
 
     /** */
     private static final String ASSERTION_FAILED = 
@@ -48,12 +48,6 @@
     
     /** */
     private final boolean isTestToBePerformed = isTestToBePerformed();
-
-    /** */
-    protected List rootOids;
-    
-    /** */
-    protected final String inputFilename = System.getProperty("jdo.tck.testdata");
     
     /**
      * The <code>main</code> is called when the class
@@ -75,7 +69,7 @@
             addTearDownClass(reader.getTearDownClassesFromFactory());
             // persist test data
             pm.currentTransaction().begin();
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             pm.makePersistentAll(rootList);
             rootOids = new ArrayList();
             for (Iterator i = rootList.iterator(); i.hasNext(); ) {
@@ -94,7 +88,7 @@
             CompanyFactoryRegistry.registerFactory();
             // get new obj graph to compare persistent graph with
             CompanyModelReader reader = new CompanyModelReader(inputFilename);
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             
             getPM();
             pm.currentTransaction().begin();

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestList.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestList.java?rev=677300&r1=677299&r2=677300&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestList.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestList.java Wed Jul
16 08:15:45 2008
@@ -21,7 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jdo.tck.JDO_Test;
+import org.apache.jdo.tck.AbstractReaderTest;
 import org.apache.jdo.tck.pc.companyListWithoutJoin.CompanyFactoryRegistry;
 import org.apache.jdo.tck.pc.companyListWithoutJoin.CompanyModelReader;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -40,7 +40,7 @@
  *<B>Assertion Description: </B>
  */
 
-public class CompletenessTestList extends JDO_Test {
+public class CompletenessTestList extends AbstractReaderTest {
 
     /** */
     private static final String ASSERTION_FAILED = 
@@ -48,12 +48,6 @@
     
     /** */
     private final boolean isTestToBePerformed = isTestToBePerformed();
-
-    /** */
-    protected List rootOids;
-    
-    /** */
-    protected final String inputFilename = System.getProperty("jdo.tck.testdata");
     
     /**
      * The <code>main</code> is called when the class
@@ -75,7 +69,7 @@
             addTearDownClass(reader.getTearDownClassesFromFactory());
             // persist test data
             pm.currentTransaction().begin();
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             pm.makePersistentAll(rootList);
             rootOids = new ArrayList();
             for (Iterator i = rootList.iterator(); i.hasNext(); ) {
@@ -94,7 +88,7 @@
             CompanyFactoryRegistry.registerFactory();
             // get new obj graph to compare persistent graph with
             CompanyModelReader reader = new CompanyModelReader(inputFilename);
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             
             getPM();
             pm.currentTransaction().begin();

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestMap.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestMap.java?rev=677300&r1=677299&r2=677300&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestMap.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestMap.java Wed Jul
16 08:15:45 2008
@@ -21,7 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jdo.tck.JDO_Test;
+import org.apache.jdo.tck.AbstractReaderTest;
 import org.apache.jdo.tck.pc.companyMapWithoutJoin.CompanyFactoryRegistry;
 import org.apache.jdo.tck.pc.companyMapWithoutJoin.CompanyModelReader;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -40,7 +40,7 @@
  *<B>Assertion Description: </B>
  */
 
-public class CompletenessTestMap extends JDO_Test {
+public class CompletenessTestMap extends AbstractReaderTest {
 
     /** */
     private static final String ASSERTION_FAILED = 
@@ -48,12 +48,6 @@
     
     /** */
     private final boolean isTestToBePerformed = isTestToBePerformed();
-
-    /** */
-    protected List rootOids;
-    
-    /** */
-    protected final String inputFilename = System.getProperty("jdo.tck.testdata");
     
     /**
      * The <code>main</code> is called when the class
@@ -75,7 +69,7 @@
             addTearDownClass(reader.getTearDownClassesFromFactory());
             // persist test data
             pm.currentTransaction().begin();
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             pm.makePersistentAll(rootList);
             rootOids = new ArrayList();
             for (Iterator i = rootList.iterator(); i.hasNext(); ) {
@@ -94,7 +88,7 @@
             CompanyFactoryRegistry.registerFactory();
             // get new obj graph to compare persistent graph with
             CompanyModelReader reader = new CompanyModelReader(inputFilename);
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             
             getPM();
             pm.currentTransaction().begin();

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestOrder.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestOrder.java?rev=677300&r1=677299&r2=677300&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestOrder.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/mapping/CompletenessTestOrder.java Wed Jul
16 08:15:45 2008
@@ -21,7 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jdo.tck.JDO_Test;
+import org.apache.jdo.tck.AbstractReaderTest;
 import org.apache.jdo.tck.pc.order.OrderFactoryRegistry;
 import org.apache.jdo.tck.pc.order.OrderModelReader;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -38,21 +38,12 @@
  *<B>Assertion Description: Compound identity is a special case of application identity.
References to other persistence-capable classes can be defined as key fields. In this case,
the object id class contains a field that is of the type of the object id of the relationship
field.</B>
  */
 
-public class CompletenessTestOrder extends JDO_Test {
+public class CompletenessTestOrder extends AbstractReaderTest {
 
     /** */
     private static final String ASSERTION_FAILED = 
         "Assertion A5.4.1-5[Compound identity is a special case of application identity.
References to other persistence-capable classes can be defined as key fields. In this case,
the object id class contains a field that is of the type of the object id of the relationship
field.] failed: ";
-    
-    /** */
-
-    /** */
-    protected List rootOids;
-    
-    /** */
-    protected final String inputFilename = 
-            System.getProperty("jdo.tck.testdata");
-    
+        
     /**
      * The <code>main</code> is called when the class
      * is directly executed from the command line.
@@ -73,7 +64,7 @@
             addTearDownClass(reader.getTearDownClassesFromFactory());
             // persist test data
             pm.currentTransaction().begin();
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             pm.makePersistentAll(rootList);
             rootOids = new ArrayList();
             for (Iterator i = rootList.iterator(); i.hasNext(); ) {
@@ -92,7 +83,7 @@
             OrderFactoryRegistry.registerFactory();
             // get new obj graph to compare persistent graph with
             OrderModelReader reader = new OrderModelReader(inputFilename);
-            List rootList = reader.getRootList();
+            List rootList = getRootList(reader);
             
             getPM();
             pm.currentTransaction().begin();



Mime
View raw message