jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r771765 - in /jackrabbit/trunk: jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/version/simple/ jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/ jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/...
Date Tue, 05 May 2009 15:06:57 GMT
Author: reschke
Date: Tue May  5 15:06:56 2009
New Revision: 771765

URL: http://svn.apache.org/viewvc?rev=771765&view=rev
Log:
JCR-2085: move version.simple.* to jackrabbit-jcr-tests

Added:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/
      - copied from r771754, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/version/simple/
Removed:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/version/simple/
Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestSuite.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/AbstractVersionTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/BasicTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckoutTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CopyTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/FrozenNodeTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/TestAll.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestSuite.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestSuite.java?rev=771765&r1=771764&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestSuite.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestSuite.java
Tue May  5 15:06:56 2009
@@ -32,6 +32,7 @@
         addTest(org.apache.jackrabbit.test.api.util.TestAll.suite());
         addTest(org.apache.jackrabbit.test.api.lock.TestAll.suite());
         addTest(org.apache.jackrabbit.test.api.version.TestAll.suite());
+        addTest(org.apache.jackrabbit.test.api.version.simple.TestAll.suite());
         addTest(org.apache.jackrabbit.test.api.observation.TestAll.suite());
         addTest(org.apache.jackrabbit.test.api.retention.TestAll.suite());
     }

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/AbstractVersionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/AbstractVersionTest.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/AbstractVersionTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/AbstractVersionTest.java
Tue May  5 15:06:56 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/BasicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/BasicTest.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/BasicTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/BasicTest.java
Tue May  5 15:06:56 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import javax.jcr.RepositoryException;
 

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java
Tue May  5 15:06:56 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.RepositoryException;

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckoutTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckoutTest.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckoutTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckoutTest.java
Tue May  5 15:06:56 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import javax.jcr.ItemNotFoundException;
 import javax.jcr.Node;

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CopyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CopyTest.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CopyTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CopyTest.java
Tue May  5 15:06:56 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
@@ -44,15 +44,28 @@
         super.setUp();
     }
 
+    protected void tearDown() throws Exception {
+        // remove copied node
+        try {
+            String dstPath = getProperty("destination");
+            superuser.getNode(dstPath).remove();
+            testRootNode.save();
+        } catch (Exception e) {
+            log.println("Exception in tearDown: " + e.toString());
+        } finally {
+            super.tearDown();
+        }
+    }
+
     public void testCopy() throws RepositoryException {
-        Workspace wsp = (Workspace) superuser.getWorkspace();
+        Workspace wsp = superuser.getWorkspace();
         VersionManager vMgr = wsp.getVersionManager();
         String srcPath = versionableNode.getPath();
         String dstPath = getProperty("destination");
         wsp.copy(srcPath, dstPath);
 
         // check versionable
-        Node v = (Node) ((javax.jcr.Session) superuser).getNode(dstPath);
+        Node v = superuser.getNode(dstPath);
         assertTrue("Copied Node.isNodeType(mix:simpleVersionable) must return true.",
                 v.isNodeType(mixSimpleVersionable));
         assertFalse("Copied Node.isNodeType(mix:versionable) must return false.",
@@ -66,19 +79,4 @@
         // check if 1 version
         assertEquals("Copied node must have 1 version.", 1, getNumberOfVersions(vh2));
     }
-
-    protected void tearDown() throws Exception {
-        // remove copied node
-        try {
-            String dstPath = getProperty("destination");
-            ((javax.jcr.Session) superuser).getNode(dstPath).remove();
-            testRootNode.save();
-        } catch (Exception e) {
-            log.println("Exception in tearDown: " + e.toString());
-        } finally {
-            super.tearDown();
-        }
-    }
-
-
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/FrozenNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/FrozenNodeTest.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/FrozenNodeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/FrozenNodeTest.java
Tue May  5 15:06:56 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
@@ -41,7 +41,7 @@
      * @throws RepositoryException
      */
     public void testFrozenNodeUUUID() throws RepositoryException {
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode();
         String puuid = n.getProperty(jcrUUID).getValue().getString();
         String nuuid = n.getUUID();
@@ -54,7 +54,7 @@
     public void testFrozenChildNodeUUUID() throws RepositoryException {
         versionableNode.addNode("child");
         versionableNode.save();
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode().getNode("child");
         String puuid = n.getProperty(jcrUUID).getValue().getString();
         String nuuid = n.getUUID();
@@ -68,7 +68,7 @@
         // make versionable node referenceable
         versionableNode.addMixin(mixReferenceable);
         versionableNode.save();
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode();
         String fuuid = n.getProperty(jcrFrozenUuid).getValue().getString();
         String ruuid = versionableNode.getUUID();
@@ -82,7 +82,7 @@
         Node n1 = versionableNode.addNode("child");
         n1.addMixin(mixReferenceable);
         versionableNode.save();
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode().getNode("child");
         String fuuid = n.getProperty(jcrFrozenUuid).getValue().getString();
         String ruuid = n1.getUUID();
@@ -94,7 +94,7 @@
      * @throws RepositoryException
      */
     public void testFrozenNodeNodeType() throws RepositoryException {
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode();
         String puuid = n.getProperty(jcrPrimaryType).getValue().getString();
         String nuuid = n.getPrimaryNodeType().getName();
@@ -107,7 +107,7 @@
     public void testFrozenChildNodeNodeType() throws RepositoryException {
         versionableNode.addNode("child");
         versionableNode.save();
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode().getNode("child");
         String puuid = n.getProperty(jcrPrimaryType).getValue().getString();
         String nuuid = n.getPrimaryNodeType().getName();
@@ -118,7 +118,7 @@
      * @throws RepositoryException
      */
     public void testFrozenNodeType() throws RepositoryException {
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode();
         String fuuid = n.getProperty("jcr:frozenPrimaryType").getValue().getString();
         String ruuid = versionableNode.getPrimaryNodeType().getName();
@@ -131,7 +131,7 @@
     public void testFrozenChildNodeType() throws RepositoryException {
         Node n1 = versionableNode.addNode("child");
         versionableNode.save();
-        Version v = (Version) versionableNode.checkin();
+        Version v = versionableNode.checkin();
         Node n = v.getFrozenNode().getNode("child");
         String fuuid = n.getProperty("jcr:frozenPrimaryType").getValue().getString();
         String ruuid = n1.getPrimaryNodeType().getName();

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java
Tue May  5 15:06:56 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.ItemExistsException;
@@ -26,7 +26,6 @@
 import javax.jcr.version.OnParentVersionAction;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionException;
-import javax.jcr.version.VersionHistory;
 import javax.jcr.version.VersionIterator;
 
 import org.apache.jackrabbit.test.NotExecutableException;
@@ -462,7 +461,7 @@
      */
     public void testLinearVersions() throws Exception {
         // first get all linear versions
-        VersionIterator iter = ((VersionHistory) versionableNode.getVersionHistory()).getAllLinearVersions();
+        VersionIterator iter = versionableNode.getVersionHistory().getAllLinearVersions();
         StringBuffer expected = new StringBuffer();
         while (iter.hasNext()) {
             expected.append(iter.nextVersion().getName()).append(",");
@@ -473,7 +472,7 @@
         expected.append(versionableNode.getBaseVersion().getName()).append(",");
 
         // get the version names again
-        iter = ((VersionHistory) versionableNode.getVersionHistory()).getAllLinearVersions();
+        iter = versionableNode.getVersionHistory().getAllLinearVersions();
         StringBuffer actual = new StringBuffer();
         while (iter.hasNext()) {
             actual.append(iter.nextVersion().getName()).append(",");

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/TestAll.java?rev=771765&r1=771754&r2=771765&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/TestAll.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/TestAll.java
Tue May  5 15:06:56 2009
@@ -14,27 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.version.simple;
+package org.apache.jackrabbit.test.api.version.simple;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /** <code>TestAll</code>... */
 public class TestAll extends TestCase {
 
-    private static Logger log = LoggerFactory.getLogger(TestAll.class);
-
     public static Test suite() {
         TestSuite suite = new TestSuite("javax.jcr.version.simple tests");
 
         suite.addTestSuite(BasicTest.class);
         suite.addTestSuite(CheckinTest.class);
         suite.addTestSuite(CheckoutTest.class);
+        suite.addTestSuite(CopyTest.class);
         suite.addTestSuite(FrozenNodeTest.class);
+        suite.addTestSuite(RestoreTest.class);
 
         return suite;
     }



Mime
View raw message