incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r601292 - /incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/JsonRenderingTest.java
Date Wed, 05 Dec 2007 11:02:54 GMT
Author: bdelacretaz
Date: Wed Dec  5 03:02:45 2007
New Revision: 601292

URL: http://svn.apache.org/viewvc?rev=601292&view=rev
Log:
testRecursiveOneLevel added, fails if level > 0, will create a JIRA issue to fix that

Modified:
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/JsonRenderingTest.java

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/JsonRenderingTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/JsonRenderingTest.java?rev=601292&r1=601291&r2=601292&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/JsonRenderingTest.java
(original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/JsonRenderingTest.java
Wed Dec  5 03:02:45 2007
@@ -52,6 +52,21 @@
         assertJavascript(testText, json ,"out.println(data.text)");
     }
     
+    public void testRecursiveOneLevel() throws IOException {
+        final Map<String,String> props = new HashMap<String,String>();
+        props.put("text", testText);
+        
+        final String parentNodeUrl = testClient.createNode(postUrl, props);
+        for(String child : new String [] { "A", "B", "C" }) {
+            props.put("child", child);
+            testClient.createNode(parentNodeUrl + "/" + child, props);
+        }
+        
+        // TODO fails if recursion level=1
+        final String json = getContent(parentNodeUrl + ".json?slingItemDumpRecursionLevel=0",
CONTENT_TYPE_JSON);
+        assertJavascript(testText, json, "out.print(data.text)");
+    }
+    
     public void testEscapedStrings() throws IOException {
         final Map<String,String> props = new HashMap<String,String>();
         props.put("dq", "Some text with \"double quotes\"");



Mime
View raw message