jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1341345 - in /jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test: AbstractMicroKernelIT.java MicroKernelIT.java
Date Tue, 22 May 2012 08:22:20 GMT
Author: stefan
Date: Tue May 22 08:22:20 2012
New Revision: 1341345

URL: http://svn.apache.org/viewvc?rev=1341345&view=rev
Log:
OAK-75: specify format and semantics of 'filter' parameter in MicroKernel API (WIP)

Modified:
    jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/AbstractMicroKernelIT.java
    jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java

Modified: jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/AbstractMicroKernelIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/AbstractMicroKernelIT.java?rev=1341345&r1=1341344&r2=1341345&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/AbstractMicroKernelIT.java
(original)
+++ jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/AbstractMicroKernelIT.java
Tue May 22 08:22:20 2012
@@ -210,6 +210,12 @@ public abstract class AbstractMicroKerne
         assertNotNull("not found: " + relPath, val);
     }
 
+    protected void assertPropertyNotExists(JSONObject obj, String relPath)
+            throws AssertionError {
+        Object val = resolveValue(obj, relPath);
+        assertNotNull("not found: " + relPath, val);
+    }
+
     protected void assertPropertyExists(JSONObject obj, String relPath, Class type)
             throws AssertionError {
         Object val = resolveValue(obj, relPath);

Modified: jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java?rev=1341345&r1=1341344&r2=1341345&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
(original)
+++ jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
Tue May 22 08:22:20 2012
@@ -21,6 +21,7 @@ import org.apache.jackrabbit.mk.test.uti
 import org.apache.jackrabbit.mk.util.MicroKernelInputStream;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -409,6 +410,21 @@ public class MicroKernelIT extends Abstr
     }
 
     @Test
+    @Ignore
+    public void getNodesFiltered() {
+        String head = mk.getHeadRevision();
+
+        // verify initial content using filter
+        String filter = "{ properties : { \"\\\\*ntProp\" } ";
+        JSONObject obj = parseJSONObject(mk.getNodes("/", head, 1, 0, -1, null));
+        assertPropertyExists(obj, "test/intProp");
+        assertPropertyExists(obj, "test/multiIntProp");
+        assertPropertyNotExists(obj, "test/stringProp");
+        assertPropertyNotExists(obj, "test/floatProp");
+        assertPropertyNotExists(obj, "test/booleanProp");
+    }
+
+    @Test
     public void getNodesNonExistingPath() {
         String head = mk.getHeadRevision();
 



Mime
View raw message