jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1515339 - in /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api: RootTest.java TreeTest.java
Date Mon, 19 Aug 2013 10:19:27 GMT
Author: mduerig
Date: Mon Aug 19 10:19:27 2013
New Revision: 1515339

URL: http://svn.apache.org/r1515339
Log:
OAK-961 Parametrise tests to run against all Microkernel backends
Parametrise RootTest, TreeTest

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/RootTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/TreeTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/RootTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/RootTest.java?rev=1515339&r1=1515338&r2=1515339&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/RootTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/RootTest.java
Mon Aug 19 10:19:27 2013
@@ -20,10 +20,8 @@ package org.apache.jackrabbit.oak.api;
 
 import static org.apache.jackrabbit.oak.OakAssert.assertSequence;
 
-import org.apache.jackrabbit.oak.Oak;
-import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
-import org.apache.jackrabbit.oak.plugins.commit.JcrConflictHandler;
-import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
+import org.apache.jackrabbit.oak.NodeStoreFixture;
+import org.apache.jackrabbit.oak.OakBaseTest;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -31,17 +29,17 @@ import org.junit.Test;
 /**
  * Contains tests related to {@link Root}
  */
-public class RootTest {
+public class RootTest extends OakBaseTest {
 
     private ContentRepository repository;
 
+    public RootTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Before
     public void setUp() {
-        repository = new Oak()
-            .with(new OpenSecurityProvider())
-            .with(JcrConflictHandler.JCR_CONFLICT_HANDLER)
-            .with(new ConflictValidatorProvider())
-            .createContentRepository();
+        repository = createContentRepository();
     }
 
     @After

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/TreeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/TreeTest.java?rev=1515339&r1=1515338&r2=1515339&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/TreeTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/TreeTest.java
Mon Aug 19 10:19:27 2013
@@ -26,7 +26,9 @@ import static org.junit.Assert.assertTru
 import java.util.Set;
 
 import com.google.common.collect.Sets;
+import org.apache.jackrabbit.oak.NodeStoreFixture;
 import org.apache.jackrabbit.oak.Oak;
+import org.apache.jackrabbit.oak.OakBaseTest;
 import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler;
 import org.apache.jackrabbit.oak.plugins.commit.ChildOrderConflictHandler;
 import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
@@ -40,13 +42,17 @@ import org.junit.Test;
 /**
  * Contains tests related to {@link Tree}
  */
-public class TreeTest {
+public class TreeTest extends OakBaseTest {
 
     private ContentRepository repository;
 
+    public TreeTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Before
     public void setUp() {
-        repository = new Oak()
+        repository = new Oak(store)
             .with(new OpenSecurityProvider())
             .with(new ChildOrderConflictHandler(new AnnotatingConflictHandler()) {
 
@@ -56,8 +62,8 @@ public class TreeTest {
                  */
                 @Override
                 public Resolution deleteChangedNode(NodeBuilder parent,
-                                                    String name,
-                                                    NodeState theirs) {
+                        String name,
+                        NodeState theirs) {
                     return Resolution.OURS;
                 }
             })



Mime
View raw message