You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by ma...@apache.org on 2005/12/29 20:55:12 UTC

svn commit: r359887 - in /db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach: GetDetachAllOnCommit.java SetDetachAllOnCommit.java

Author: madams
Date: Thu Dec 29 11:55:10 2005
New Revision: 359887

URL: http://svn.apache.org/viewcvs?rev=359887&view=rev
Log:
trivial addition...

Added:
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/GetDetachAllOnCommit.java
Modified:
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/SetDetachAllOnCommit.java

Added: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/GetDetachAllOnCommit.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/GetDetachAllOnCommit.java?rev=359887&view=auto
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/GetDetachAllOnCommit.java (added)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/GetDetachAllOnCommit.java Thu Dec 29 11:55:10 2005
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.jdo.tck.api.persistencemanager.detach;
+
+import javax.jdo.PersistenceManager;
+import javax.jdo.Transaction;
+import org.apache.jdo.tck.pc.mylib.PCPoint;
+import org.apache.jdo.tck.util.BatchTestRunner;
+
+/**
+ * <B>Title:</B> Test SetDetachAllOnCommit
+ * <BR>
+ * <B>Keywords:</B> KEYWORDS
+ * <BR>
+ * <B>Assertion IDs:</B> A12.6.8-1
+ * <BR>
+ * <B>Assertion Description: </B>
+ * We define a new property called DetachOnClose PersistenceManager.setDetachOnClose(boolean detachOnClose) sets the DetachOnClose property
+ */
+public class GetDetachAllOnCommit extends DetachTest {
+    
+    private static final String ASSERTION_FAILED = "Assertion A12.6.8-1 (SetDetachAllOnCommit) failed: ";
+    
+    /**
+     * The <code>main</code> is called when the class
+     * is directly executed from the command line.
+     * @param args The arguments passed to the program.
+     */
+    public static void main(String[] args) {
+        BatchTestRunner.run(SetDetachAllOnCommit.class);
+    }
+
+    /** */
+    public void test() {
+        pm = getPM();
+    
+        runTestGetDetachAllOnCommit(pm);
+        
+        pm.close();
+        pm = null;
+    }
+
+    /** */
+    protected void runTestGetDetachAllOnCommit(PersistenceManager pm) {
+        pm.setDetachAllOnCommit(false);
+        if (pm.getDetachAllOnCommit()) {
+            fail(ASSERTION_FAILED,
+                 "pm.getDetachAllOnCommit() should return false after setting the flag to false.");
+        }
+
+        pm.setDetachAllOnCommit(true);
+        if (!pm.getDetachAllOnCommit()) {
+            fail(ASSERTION_FAILED,
+                 "pm.getDetachAllOnCommit() should return true after setting the flag to true.");
+        }
+    }
+}
+

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/SetDetachAllOnCommit.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/SetDetachAllOnCommit.java?rev=359887&r1=359886&r2=359887&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/SetDetachAllOnCommit.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/api/persistencemanager/detach/SetDetachAllOnCommit.java Thu Dec 29 11:55:10 2005
@@ -28,7 +28,7 @@
  * <B>Assertion IDs:</B> A12.6.8-1
  * <BR>
  * <B>Assertion Description: </B>
- * We define a new property called DetachOnClose PersistenceManager.setDetachOnClose(boolean detachOnClose) sets the DetachOnClose property
+ * We define a new property called DetachAllOnCommit PersistenceManager.getDetachAllOnCommit(boolean detachAllOnCommit) gets the DetachAllOnCommit property
  */
 public class SetDetachAllOnCommit extends DetachTest {