incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r522615 - in /incubator/graffito/trunk/jcr/jcr-mapping/src: test-config/ test-config/nodetypes/ test/org/apache/portals/graffito/jcr/ test/org/apache/portals/graffito/jcr/persistence/atomic/ test/org/apache/portals/graffito/jcr/persistence/...
Date Mon, 26 Mar 2007 20:27:57 GMT
Author: clombart
Date: Mon Mar 26 13:27:56 2007
New Revision: 522615

URL: http://svn.apache.org/viewvc?view=rev&rev=522615
Log:
working on GRFT-84. add more unit test

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-atomic.xml
    incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml
    incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AllTests.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-atomic.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-atomic.xml?view=diff&rev=522615&r1=522614&r2=522615
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-atomic.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-atomic.xml Mon Mar
26 13:27:56 2007
@@ -36,6 +36,7 @@
 		                       collectionConverter="org.apache.portals.graffito.jcr.persistence.collectionconverter.impl.MultiValueCollectionConverterImpl"
/>
 		                       
 
-	</class-descriptor> 
+	</class-descriptor> 
+	
 </graffito-jcr>
  

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml?view=diff&rev=522615&r1=522614&r2=522615
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml Mon
Mar 26 13:27:56 2007
@@ -30,6 +30,23 @@
 		<field-descriptor fieldName="data" jcrName="jcr:data"/>	
 		<field-descriptor fieldName="lastModified" jcrName="jcr:lastModified"/>	
 	</class-descriptor>	
+
+    <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PropertyTest"
jcrNodeType="graffito:propertytest" >
+		<field-descriptor fieldName="path" path="true" />
+		<field-descriptor fieldName="requiredProp" jcrName="graffito:requiredProp" />
+		<field-descriptor fieldName="requiredWithConstraintsProp" jcrName="graffito:requiredWithConstraintsProp"
/>
+		<field-descriptor fieldName="autoCreatedProp" jcrName="graffito:autoCreatedProp" />
+	</class-descriptor>	
+	<!-- class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PropertyTest"
jcrNodeType="graffito:propertytest" >
+		<field-descriptor fieldName="path" path="true" />
+		<field-descriptor fieldName="requiredProp" jcrName="graffito:requiredProp" />
+		<field-descriptor fieldName="requiredWithConstraintsProp" jcrName="graffito:requiredWithConstraintsProp"
/>
+		<field-descriptor fieldName="autoCreadedProp" jcrName="graffito:autoCreadedProp" />
+		<field-descriptor fieldName="autoCreatedWithConstraintsProp" jcrName="graffito:autoCreatedWithConstraintsProp"
/>
+		<field-descriptor fieldName="mandatoryProp" jcrName="graffito:mandatoryProp" />
+		<field-descriptor fieldName="mandatoryWithConstaintsProp" jcrName="graffito:mandatoryWithConstaintsProp"
/>
+		<field-descriptor fieldName="protectedWithDefaultValueProp" jcrName="graffito:protectedWithDefaultValueProp"
/>
+	</class-descriptor -->	
 	
 </graffito-jcr>
  

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml?view=diff&rev=522615&r1=522614&r2=522615
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml
Mon Mar 26 13:27:56 2007
@@ -170,5 +170,24 @@
     </supertypes>
   </nodeType>    
 
+
+   <nodeType name="graffito:propertytest" >
+    <supertypes>
+      <supertype>nt:base</supertype>
+    </supertypes>
+     <propertyDefinition name="graffito:requiredProp" requiredType="String" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false" multiple="false" />   
+     <propertyDefinition name="graffito:requiredWithConstraintsProp" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" multiple="false"
>   
+     	<valueConstraints>
+        	<valueConstraint>abc</valueConstraint>
+	        <valueConstraint>def</valueConstraint>
+	        <valueConstraint>ghi</valueConstraint>
+	 	</valueConstraints>     
+     </propertyDefinition>
+     <propertyDefinition name="graffito:autoCreatedProp" requiredType="String" autoCreated="true"
mandatory="false" onParentVersion="INITIALIZE" protected="false" multiple="false" >   
+            <defaultValues>
+                <defaultValue>autoCreatePropValue</defaultValue>
+            </defaultValues>
+     </propertyDefinition>
+   </nodeType> 
 </nodeTypes>
 

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java?view=diff&rev=522615&r1=522614&r2=522615
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/AllTests.java
Mon Mar 26 13:27:56 2007
@@ -45,13 +45,15 @@
         suite.addTest(org.apache.portals.graffito.jcr.persistence.collectionconverter.AllTests.buildSuite());
         suite.addTest(org.apache.portals.graffito.jcr.persistence.inheritance.AllTests.buildSuite());
         suite.addTest(org.apache.portals.graffito.jcr.persistence.interfaces.AllTests.buildSuite());
+        suite.addTest(org.apache.portals.graffito.jcr.persistence.jcrnodetype.AllTests.buildSuite());
       
+        suite.addTest(org.apache.portals.graffito.jcr.persistence.lock.AllTests.buildSuite());
       
         suite.addTest(org.apache.portals.graffito.jcr.persistence.proxy.AllTests.buildSuite());
         suite.addTest(org.apache.portals.graffito.jcr.persistence.query.AllTests.buildSuite());
-        suite.addTest(org.apache.portals.graffito.jcr.persistence.version.AllTests.buildSuite());
-        suite.addTest(org.apache.portals.graffito.jcr.persistence.lock.AllTests.buildSuite());
+        suite.addTest(org.apache.portals.graffito.jcr.persistence.uuid.AllTests.buildSuite());
       
+        suite.addTest(org.apache.portals.graffito.jcr.persistence.version.AllTests.buildSuite());
       
         suite.addTest(org.apache.portals.graffito.jcr.querymanager.AllTests.buildSuite());
         suite.addTest(org.apache.portals.graffito.jcr.repository.AllTests.buildSuite());
-        suite.addTest(org.apache.portals.graffito.jcr.persistence.jcrnodetype.AllTests.buildSuite());
+        
         return suite;
     }
 }

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java?view=diff&rev=522615&r1=522614&r2=522615
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/TestBase.java
Mon Mar 26 13:27:56 2007
@@ -121,13 +121,20 @@
 	 */
 	protected void setUp() throws Exception
 	{
-		super.setUp();
-        
-        if (!isInit) {
-            initPersistenceManager();
-            registerNodeTypes(getSession());
-            isInit = true;
-        }
+		try {
+			super.setUp();
+	        
+	        if (!isInit) {
+	            initPersistenceManager();
+	            registerNodeTypes(getSession());
+	            isInit = true;
+	        }
+			
+		}
+		catch (Exception e )
+		{
+			e.printStackTrace();
+		}
 	}
 
 	/**

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AllTests.java?view=diff&rev=522615&r1=522614&r2=522615
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AllTests.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AllTests.java
Mon Mar 26 13:27:56 2007
@@ -37,7 +37,8 @@
         TestSuite suite= new TestSuite("Test for org.apache.portals.graffito.jcr.persistence.atomic");
         //$JUnit-BEGIN$
         suite.addTestSuite(AtomicTest.class);
-        suite.addTestSuite(NullAtomicTest.class);
+        suite.addTestSuite(NullAtomicTest.class);        
+        
         //$JUnit-END$
 
         return suite;

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java?view=diff&rev=522615&r1=522614&r2=522615
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/AllTests.java
Mon Mar 26 13:27:56 2007
@@ -37,6 +37,7 @@
         TestSuite suite= new TestSuite("Test for org.apache.portals.graffito.jcr.persistence.jcrnodetype");
         //$JUnit-BEGIN$
         suite.addTestSuite(PersistenceManagerJcrNodeTypeTest.class);                
+        suite.addTestSuite(PersistenceManagerJcrPropertyTest.class);
         //$JUnit-END$
 
         return suite;



Mime
View raw message