jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r428296 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyCalendarTest.java
Date Thu, 03 Aug 2006 09:58:15 GMT
Author: mreutegg
Date: Thu Aug  3 02:58:15 2006
New Revision: 428296

URL: http://svn.apache.org/viewvc?rev=428296&view=rev
Log:
JCR-502: TCK: SetPropertyCalendarTest compares Calendar objects

Modified:
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyCalendarTest.java

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyCalendarTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyCalendarTest.java?rev=428296&r1=428295&r2=428296&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyCalendarTest.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyCalendarTest.java
Thu Aug  3 02:58:15 2006
@@ -19,6 +19,7 @@
 import org.apache.jackrabbit.test.AbstractJCRTest;
 
 import javax.jcr.Node;
+import javax.jcr.ValueFactory;
 
 import java.util.Calendar;
 import java.util.GregorianCalendar;
@@ -36,12 +37,15 @@
 
     private Node testNode;
 
+    private ValueFactory vFactory;
+
     private Calendar c1 = new GregorianCalendar(2005, 1, 10, 14, 8, 56);
     private Calendar c2 = new GregorianCalendar(1945, 1, 6, 16, 20, 0);
 
     protected void setUp() throws Exception {
         super.setUp();
         testNode = testRootNode.addNode(nodeName1, testNodeType);
+        vFactory = superuser.getValueFactory();
     }
 
     /**
@@ -52,8 +56,8 @@
         testNode.setProperty(propertyName1, c1);
         superuser.save();
         assertEquals("Setting property with Node.setProperty(String, Calendar) and Session.save()
not working",
-                c1,
-                testNode.getProperty(propertyName1).getDate());
+                vFactory.createValue(c1),
+                testNode.getProperty(propertyName1).getValue());
     }
 
     /**
@@ -66,8 +70,8 @@
         testNode.setProperty(propertyName1, c2);
         superuser.save();
         assertEquals("Modifying property with Node.setProperty(String, Calendar) and Session.save()
not working",
-                c2,
-                testNode.getProperty(propertyName1).getDate());
+                vFactory.createValue(c2),
+                testNode.getProperty(propertyName1).getValue());
     }
 
     /**
@@ -78,8 +82,8 @@
         testNode.setProperty(propertyName1, c1);
         testRootNode.save();
         assertEquals("Setting property with Node.setProperty(String, Calendar) and parentNode.save()
not working",
-                c1,
-                testNode.getProperty(propertyName1).getDate());
+                vFactory.createValue(c1),
+                testNode.getProperty(propertyName1).getValue());
     }
 
     /**
@@ -92,8 +96,8 @@
         testNode.setProperty(propertyName1, c2);
         testRootNode.save();
         assertEquals("Modifying property with Node.setProperty(String, Calendar) and parentNode.save()
not working",
-                c2,
-                testNode.getProperty(propertyName1).getDate());
+                vFactory.createValue(c2),
+                testNode.getProperty(propertyName1).getValue());
     }
 
     /**



Mime
View raw message