[jboss-svn-commits] JBL Code SVN: r15611 - labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 5 18:15:43 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-10-05 18:15:39 -0400 (Fri, 05 Oct 2007)
New Revision: 15611

Modified:
   labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java
Log:
-updated the custom global resolver tests

Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java	2007-10-05 21:34:55 UTC (rev 15610)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java	2007-10-05 22:15:39 UTC (rev 15611)
@@ -227,6 +227,8 @@
         } );
 
         workingMemory.fireAllRules();
+        
+        assertEquals(1, list.size() );
 
         assertEquals( new Integer( 5 ),
                       list.get( 0 ) );
@@ -250,12 +252,6 @@
         map.put( "string",
                  string );
         
-        
-        Cheese bree = new Cheese ();
-        bree.setPrice( 100 );
-        
-        workingMemory.insert( bree );
-
         workingMemory.setGlobalResolver( new GlobalResolver() {
             public Object resolveGlobal(String identifier) {
                 return map.get( identifier );
@@ -267,12 +263,22 @@
                          value );
             }
 
-        } );
+        } );                
+        
+        Cheese bree = new Cheese ();
+        bree.setPrice( 100 );
+        
+        workingMemory.insert( bree );
 
         workingMemory.fireAllRules();
 
+        assertEquals(2, list.size() );        
+        
         assertEquals( new Integer( 5 ),
                       list.get( 0 ) );
+        
+        assertEquals( new Integer( 6 ),
+                      list.get( 1 ) );        
     }
     
 




More information about the jboss-svn-commits mailing list