You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2005/04/01 11:39:07 UTC
svn commit: r159673 -
incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java
Author: jukka
Date: Fri Apr 1 01:39:06 2005
New Revision: 159673
URL: http://svn.apache.org/viewcvs?view=rev&rev=159673
Log:
Added test cases for the versioning adapters from JCR-94.
Modified:
incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java
Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java?view=diff&r1=159672&r2=159673
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java (original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/test/org/apache/jackrabbit/test/rmi/RemoteAdapterTest.java Fri Apr 1 01:39:06 2005
@@ -38,6 +38,8 @@
import javax.jcr.query.QueryManager;
import javax.jcr.query.QueryResult;
import javax.jcr.query.Row;
+import javax.jcr.version.Version;
+import javax.jcr.version.VersionHistory;
import junit.framework.TestCase;
@@ -59,6 +61,8 @@
import org.apache.jackrabbit.rmi.remote.RemoteRepository;
import org.apache.jackrabbit.rmi.remote.RemoteRow;
import org.apache.jackrabbit.rmi.remote.RemoteSession;
+import org.apache.jackrabbit.rmi.remote.RemoteVersion;
+import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory;
import org.apache.jackrabbit.rmi.server.ServerAdapterFactory;
@@ -472,6 +476,37 @@
Row row = (Row) mock;
RemoteRow remote = remoteFactory.getRemoteRow(row);
Row local = localFactory.getRow(remote);
+
+ runTests(local);
+ }
+
+ /**
+ * Tests Version adapters.
+ *
+ * @throws Exception on errors
+ */
+ public void testVersion() throws Exception {
+ prepareTests(Version.class);
+
+ Version version = (Version) mock;
+ RemoteVersion remote = remoteFactory.getRemoteVersion(version);
+ Version local = localFactory.getVersion(null, remote);
+
+ runTests(local);
+ }
+
+ /**
+ * Tests VersionHistory adapters.
+ *
+ * @throws Exception on errors
+ */
+ public void testVersionHistory() throws Exception {
+ prepareTests(VersionHistory.class);
+
+ VersionHistory history = (VersionHistory) mock;
+ RemoteVersionHistory remote =
+ remoteFactory.getRemoteVersionHistory(history);
+ VersionHistory local = localFactory.getVersionHistory(null, remote);
runTests(local);
}