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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Oct 24 09:26:51 EDT 2006


Author: mark.proctor at jboss.com
Date: 2006-10-24 09:26:46 -0400 (Tue, 24 Oct 2006)
New Revision: 7078

Modified:
   labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
   labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertionsNot.drl
Log:
-Fixed testLogicalAssertionsNot

Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java	2006-10-24 13:18:55 UTC (rev 7077)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java	2006-10-24 13:26:46 UTC (rev 7078)
@@ -2447,10 +2447,10 @@
 
         List list;
 
-        final String a = new String( "a" );
-        final Integer i = new Integer( 1 );
-        workingMemory.setGlobal( "i",
-                                 i );
+        final Person a = new Person( "a" );
+        final Cheese cheese = new Cheese( "brie", 1 );
+        workingMemory.setGlobal( "cheese",
+                                 cheese );
 
         workingMemory.fireAllRules();
         list = workingMemory.getObjects();
@@ -2458,7 +2458,7 @@
                       1,
                       list.size() );
         assertEquals( "i was not asserted by not a => i.",
-                      i,
+                      cheese,
                       list.get( 0 ) );
 
         final FactHandle h = workingMemory.assertObject( a );
@@ -2473,7 +2473,7 @@
                       a,
                       list.get( 0 ) );
         assertFalse( "i was not rectracted.",
-                     list.contains( i ) );
+                     list.contains( cheese ) );
 
         // no rules should fire, but nevertheless...
         // workingMemory.fireAllRules();
@@ -2488,7 +2488,7 @@
                       1,
                       list.size() );
         assertEquals( "i was not asserted by not a => i.",
-                      i,
+                      cheese,
                       list.get( 0 ) );
     }
 

Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertionsNot.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertionsNot.drl	2006-10-24 13:18:55 UTC (rev 7077)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_LogicalAssertionsNot.drl	2006-10-24 13:26:46 UTC (rev 7078)
@@ -1,13 +1,13 @@
 package org.drools.test;
 
-import java.lang.String;
-import java.lang.Integer;
+import org.drools.Cheese
+import org.drools.Person
 
-global java.lang.Integer i;
+global Cheese cheese
 
 rule "r"
     when
-        not String()
+        not Person()
     then
-   		assertLogical(i);
+   		assertLogical(cheese);
 end
\ No newline at end of file




More information about the jboss-svn-commits mailing list