incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apope...@apache.org
Subject svn commit: r375908 - in /incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl: PersistenceManagerRemoveTest.java PersistenceManagerSameNameSiblingTest.java PersistenceManagerSimpleQueryTest.java
Date Wed, 08 Feb 2006 10:02:57 GMT
Author: apopescu
Date: Wed Feb  8 02:02:47 2006
New Revision: 375908

URL: http://svn.apache.org/viewcvs?rev=375908&view=rev
Log:
assertTrue changed to assertEquals (allows seeing the wrong actual value)

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSameNameSiblingTest.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSimpleQueryTest.java

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java?rev=375908&r1=375907&r2=375908&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerRemoveTest.java
Wed Feb  8 02:02:47 2006
@@ -111,7 +111,7 @@
 			filter.setScope("//");
 			query = queryManager.createQuery(filter);			
 			Collection result = persistenceManager.getObjects(query);
-			assertTrue("Invalid number of objects", result.size() == 5);
+			assertEquals("Invalid number of objects", 5, result.size());
 
 		}
 		catch (Exception e)

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSameNameSiblingTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSameNameSiblingTest.java?rev=375908&r1=375907&r2=375908&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSameNameSiblingTest.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSameNameSiblingTest.java
Wed Feb  8 02:02:47 2006
@@ -80,7 +80,7 @@
 			filter.setScope("/");
 			Query query = queryManager.createQuery(filter);
 			Collection result = persistenceManager.getObjects(query);
-            assertTrue("Incorrect number of objects found", result.size() == 10);
+            assertEquals("Incorrect number of objects found", 10, result.size());
                          
             // Get objects
             Atomic atomic = (Atomic) persistenceManager.getObject(Atomic.class, "/test[2]");

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSimpleQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSimpleQueryTest.java?rev=375908&r1=375907&r2=375908&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSimpleQueryTest.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/impl/PersistenceManagerSimpleQueryTest.java
Wed Feb  8 02:02:47 2006
@@ -132,7 +132,7 @@
     	      
     	      PersistenceManager persistenceManager = this.getPersistenceManager();
     	      Collection result = persistenceManager.getObjects(query);
-    	      assertTrue("Invalid number of objects - should be = 1", result.size() == 1);
+    	      assertEquals("Invalid number of objects - should be = 1", 1, result.size());
     	      Paragraph paragraph = (Paragraph) result.iterator().next();
     	      assertTrue("Invalid paragraph found" , paragraph.getText().equals("Para 1"));
             
@@ -164,7 +164,7 @@
     	      
     	      PersistenceManager persistenceManager = this.getPersistenceManager();
     	      Collection result = persistenceManager.getObjects(query);
-    	      assertTrue("Invalid number of objects - should be = 3", result.size() == 3);
+    	      assertEquals("Invalid number of objects - should be = 3", 3, result.size());
 
     	      Paragraph[] paragraphs = (Paragraph[]) result.toArray(new Paragraph[result.size()]);
     	      assertTrue("Invalid paragraph found", paragraphs[0].getText().equals("Para 1"));
@@ -207,7 +207,7 @@
     	      
     	      PersistenceManager persistenceManager = this.getPersistenceManager();
     	      Collection result = persistenceManager.getObjects(query);
-    	      assertTrue("Invalid number of objects - should be = 2", result.size() == 2);
+    	      assertEquals("Invalid number of objects - should be = 2", 2, result.size());
     	      
     	      Paragraph[] paragraphs = (Paragraph[]) result.toArray(new Paragraph[result.size()]);
     	      assertTrue("Invalid paragraph found", paragraphs[0].getText().equals("Para 1"));
@@ -239,7 +239,7 @@
     	      
     	      PersistenceManager persistenceManager = this.getPersistenceManager();
     	      Collection result = persistenceManager.getObjects(query);
-    	      assertTrue("Invalid number of objects - should be = 3", result.size() == 3);
+    	      assertEquals("Invalid number of objects - should be = 3", 3, result.size());
 
     	      Paragraph[] paragraphs = (Paragraph[]) result.toArray(new Paragraph[result.size()]);
     	      assertTrue("Invalid paragraph found", paragraphs[0].getText().equals("Para 3"));



Mime
View raw message