in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java [99:120]
public void testRecursiveZeroLevels() throws IOException {
final Map<String, String> props = new HashMap<String, String>();
props.put("text", testText);
final String parentNodeUrl = testClient.createNode(postUrl, props);
final String[] children = {"A", "B", "C"};
for (String child : children) {
props.put("child", child);
testClient.createNode(parentNodeUrl + "/" + child, props);
}
// .json and .0.json must both return 0 levels
final String[] extensions = {".json", ".0.json"};
for (String extension : extensions) {
final String json = getContent(parentNodeUrl + extension, CONTENT_TYPE_JSON);
assertJavascript(testText, json, "out.print(data.text)");
for (String child : children) {
final String testInfo = "extension: " + extension;
assertJavascript("undefined", json, "out.print(typeof data[\"" + child + "\"])", testInfo);
}
}
}