jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1377248 - in /jackrabbit/oak/trunk/oak-jcr: pom.xml src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Date Sat, 25 Aug 2012 10:15:11 GMT
Author: reschke
Date: Sat Aug 25 10:15:11 2012
New Revision: 1377248

URL: http://svn.apache.org/viewvc?rev=1377248&view=rev
Log:
OAK-6: add more property definitions to test node types (work-in-progress)

Modified:
    jackrabbit/oak/trunk/oak-jcr/pom.xml
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java

Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1377248&r1=1377247&r2=1377248&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-jcr/pom.xml Sat Aug 25 10:15:11 2012
@@ -70,7 +70,12 @@ org.apache.jackrabbit.test.api.SessionRe
 org.apache.jackrabbit.test.api.HasPermissionTest
 org.apache.jackrabbit.test.api.lock.LockManagerTest#testAddInvalidLockToken
 org.apache.jackrabbit.test.api.lock.LockManagerTest#testLockNonLockable
+org.apache.jackrabbit.test.api.SetPropertyConstraintViolationExceptionTest<!-- OAK-66
-->
+org.apache.jackrabbit.test.api.SetValueConstraintViolationExceptionTest<!-- OAK-66 -->
 org.apache.jackrabbit.test.api.nodetype.PropertyDefTest#testIsMandatory
+org.apache.jackrabbit.test.api.nodetype.CanSetPropertyBinaryTest#testValueConstraintNotSatisfied<!--
OAK-66 -->
+org.apache.jackrabbit.test.api.nodetype.CanSetPropertyBinaryTest#testValueConstraintNotSatisfiedMultiple<!--
OAK-66 -->
+org.apache.jackrabbit.test.api.nodetype.CanSetPropertyStringTest#testValueConstraintNotSatisfied<!--
OAK-66 -->
 org.apache.jackrabbit.test.api.nodetype.CanSetPropertyDateTest#testConversions
 org.apache.jackrabbit.test.api.nodetype.CanSetPropertyMultipleTest#testReturnFalseBecauseIsProtected
 org.apache.jackrabbit.test.api.nodetype.CanSetPropertyMultipleTest#testReturnFalseBecauseIsNotMultiple

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java?rev=1377248&r1=1377247&r2=1377248&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Sat Aug 25 10:15:11 2012
@@ -73,6 +73,7 @@ public class TestContentLoader {
         }
 
         // test:canSetProperty
+        // TODO: add all property definitions from jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/test-nodetypes.xml
         {
             NodeTypeTemplate nttmpl = ntm.createNodeTypeTemplate();
             nttmpl.setName("test:canSetProperty");
@@ -80,6 +81,47 @@ public class TestContentLoader {
 
             // add property definitions
 
+            PropertyDefinitionTemplate pdtmpl = ntm.createPropertyDefinitionTemplate();
+            pdtmpl.setName("String");
+            pdtmpl.setRequiredType(PropertyType.STRING);
+            pdtmpl.setOnParentVersion(OnParentVersionAction.COPY);
+            nttmpl.getPropertyDefinitionTemplates().add(pdtmpl);
+
+            pdtmpl = ntm.createPropertyDefinitionTemplate();
+            pdtmpl.setName("StringConstraints");
+            pdtmpl.setRequiredType(PropertyType.STRING);
+            pdtmpl.setOnParentVersion(OnParentVersionAction.COPY);
+            pdtmpl.setValueConstraints(new String[] { "abc", "def", "ghi" });
+            nttmpl.getPropertyDefinitionTemplates().add(pdtmpl);
+
+            pdtmpl = ntm.createPropertyDefinitionTemplate();
+            pdtmpl.setName("StringMultipleConstraints");
+            pdtmpl.setMultiple(true);
+            pdtmpl.setRequiredType(PropertyType.STRING);
+            pdtmpl.setOnParentVersion(OnParentVersionAction.COPY);
+            nttmpl.getPropertyDefinitionTemplates().add(pdtmpl);
+
+            pdtmpl = ntm.createPropertyDefinitionTemplate();
+            pdtmpl.setName("Binary");
+            pdtmpl.setRequiredType(PropertyType.BINARY);
+            pdtmpl.setOnParentVersion(OnParentVersionAction.COPY);
+            nttmpl.getPropertyDefinitionTemplates().add(pdtmpl);
+
+            pdtmpl = ntm.createPropertyDefinitionTemplate();
+            pdtmpl.setName("BinaryConstraints");
+            pdtmpl.setRequiredType(PropertyType.BINARY);
+            pdtmpl.setOnParentVersion(OnParentVersionAction.COPY);
+            pdtmpl.setValueConstraints(new String[] { "(,100)" });
+            nttmpl.getPropertyDefinitionTemplates().add(pdtmpl);
+
+            pdtmpl = ntm.createPropertyDefinitionTemplate();
+            pdtmpl.setName("BinaryMultipleConstraints");
+            pdtmpl.setMultiple(true);
+            pdtmpl.setRequiredType(PropertyType.BINARY);
+            pdtmpl.setOnParentVersion(OnParentVersionAction.COPY);
+            pdtmpl.setValueConstraints(new String[] { "(,100)" });
+            nttmpl.getPropertyDefinitionTemplates().add(pdtmpl);
+
             ntm.registerNodeType(nttmpl, true);
         }
 



Mime
View raw message