jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r575090 - /jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java
Date Wed, 12 Sep 2007 21:46:59 GMT
Author: clombart
Date: Wed Sep 12 14:46:59 2007
New Revision: 575090

URL: http://svn.apache.org/viewvc?rev=575090&view=rev
Log:
Review this unit test because the ByteArray field converter has been changed. Now, byte[]
are not stored as String. 

Modified:
    jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java

Modified: jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java?rev=575090&r1=575089&r2=575090&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java
(original)
+++ jackrabbit/trunk/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/test/java/org/apache/jackrabbit/ocm/manager/query/ObjectContentManagerAtomicQueryTest.java
Wed Sep 12 14:46:59 2007
@@ -166,14 +166,14 @@
 			assertTrue("Invalid number of objects - should be = 50 ", result.size() == 50);
 			
 			filter = queryManager.createFilter(Atomic.class);			
-			filter.addContains("byteArray", "ocm");
+			filter.addContains("string", "JCR");
 			query = queryManager.createQuery(filter);
 			
 			result = ocm.getObjects(query);			
 			assertTrue("Invalid number of objects - should be = 50 ", result.size() == 50);
 			
 			filter = queryManager.createFilter(Atomic.class);			
-			filter.addContains("byteArray", "String");
+			filter.addContains("string", "ocm");
 			query = queryManager.createQuery(filter);
 			
 			result = ocm.getObjects(query);			
@@ -204,8 +204,7 @@
 				a.setBooleanObject(new Boolean(i%2==0));
 				a.setBooleanPrimitive(true);
 				a.setIntegerObject(new Integer(100 * i));
-				a.setIntPrimitive(200 + i);
-				a.setString("Test String " + i);
+				a.setIntPrimitive(200 + i);				
 				a.setDate(date);
 				Calendar calendar = Calendar.getInstance();
 				calendar.set(1976, 4, 20, 15, 40);
@@ -216,6 +215,7 @@
 				a.setTimestamp(new Timestamp(now));
 				if ((i % 2) == 0)
 				{
+					a.setString("Test String JCR " + i);
 				     a.setByteArray("This is small object stored in a JCR repository".getBytes());
 				     a.setInputStream(new ByteArrayInputStream("Test inputstream".getBytes()));
 				}
@@ -223,6 +223,7 @@
 				{
 					 a.setByteArray("This is small object stored in the ocm repository".getBytes());
 					 a.setInputStream(new ByteArrayInputStream("Another Stream".getBytes()));
+					 a.setString("Test String " + i);
 				}
 				ocm.insert(a);
 				



Mime
View raw message