This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag 
org.apache.sling.jcr.contentparser-1.0.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentparser.git

commit d1d3c2ab68b79b29349fcfd24eb2f759da42c05f
Author: Konrad Windszus <[email protected]>
AuthorDate: Mon Mar 13 14:07:30 2017 +0000

    added ignored test for same name property and sub resource
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/fscontentparser@1786694
 13f79535-47bb-0310-9956-ffa450edef68
---
 .../fscontentparser/impl/JcrXmlContentFileParserTest.java     | 11 +++++++++++
 src/test/resources/content-test/content.jcr.xml               |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/src/test/java/org/apache/sling/fscontentparser/impl/JcrXmlContentFileParserTest.java
 
b/src/test/java/org/apache/sling/fscontentparser/impl/JcrXmlContentFileParserTest.java
index 8678b30..cf78f49 100644
--- 
a/src/test/java/org/apache/sling/fscontentparser/impl/JcrXmlContentFileParserTest.java
+++ 
b/src/test/java/org/apache/sling/fscontentparser/impl/JcrXmlContentFileParserTest.java
@@ -37,6 +37,7 @@ import 
org.apache.sling.fscontentparser.ContentFileParserFactory;
 import org.apache.sling.fscontentparser.ParseException;
 import org.apache.sling.fscontentparser.ParserOptions;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import com.google.common.collect.ImmutableSet;
@@ -115,4 +116,14 @@ public class JcrXmlContentFileParserTest {
         assertNotNull(props.get("content"));
     }
 
+    @Test
+    @Ignore
+    public void testSameNamePropertyAndSubResource() throws Exception {
+        ContentFileParser underTest = 
ContentFileParserFactory.create(ContentFileType.JCR_XML);
+        Map<String,Object> content = underTest.parse(file);
+        Map<String,Object> props = getDeep(content, "jcr:content/teaserbar");
+        // teaserbaritem is a direct property as well as a sub resource
+        assertEquals("test", props.get("teaserbaritem"));
+    }
+
 }
diff --git a/src/test/resources/content-test/content.jcr.xml 
b/src/test/resources/content-test/content.jcr.xml
index 274cfe7..7d97cc0 100644
--- a/src/test/resources/content-test/content.jcr.xml
+++ b/src/test/resources/content-test/content.jcr.xml
@@ -38,7 +38,8 @@
       pageTitle="Sample Site">
     <teaserbar
         jcr:primaryType="nt:unstructured"
-        
sling:resourceType="samples/sample-app/components/content/teaserbar/teaserbarParsys">
+        
sling:resourceType="samples/sample-app/components/content/teaserbar/teaserbarParsys"
+        teaserbaritem="test">
       <teaserbaritem
           jcr:primaryType="nt:unstructured"
           
sling:resourceType="samples/sample-app/components/content/teaserbar/teaserbarItem"

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to