[jboss-svn-commits] JBL Code SVN: r11882 - labs/jbossrules/trunk/experimental/drools-testing/src/org/drools/testing/core/engine.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed May 16 07:27:58 EDT 2007


Author: mshaw
Date: 2007-05-16 07:27:58 -0400 (Wed, 16 May 2007)
New Revision: 11882

Modified:
   labs/jbossrules/trunk/experimental/drools-testing/src/org/drools/testing/core/engine/TestRunner.java
Log:


Modified: labs/jbossrules/trunk/experimental/drools-testing/src/org/drools/testing/core/engine/TestRunner.java
===================================================================
--- labs/jbossrules/trunk/experimental/drools-testing/src/org/drools/testing/core/engine/TestRunner.java	2007-05-16 11:15:54 UTC (rev 11881)
+++ labs/jbossrules/trunk/experimental/drools-testing/src/org/drools/testing/core/engine/TestRunner.java	2007-05-16 11:27:58 UTC (rev 11882)
@@ -1,7 +1,10 @@
 package org.drools.testing.core.engine;
 
+import org.drools.rule.Package;
 import org.drools.testing.core.beans.TestSuite;
 import org.drools.testing.core.exception.RuleTestLanguageException;
+import org.drools.testing.core.exception.RuleTestServiceUnavailableException;
+import org.drools.testing.core.wrapper.RuleBaseWrapper;
 
 /**
  * 
@@ -27,13 +30,30 @@
 	 * The run method is invoked by the client and returns true if test
 	 * was successfull and false otherwise.
 	 * 
+	 * @param pkg
 	 * @return boolean
 	 * @throws RuleTestLanguageException
 	 */
-	public boolean run () throws RuleTestLanguageException {
+	public boolean run (Package pkg) throws RuleTestLanguageException {
+		try {
+			RuleBaseWrapper.getInstance().getRuleBase().addPackage(pkg);
+		}catch (Exception e) {
+			throw new RuleTestServiceUnavailableException("Could not load rule package: "
+					+pkg.getName());
+		}
 		
-		
-		
 		return true;
 	}
+	
+	/**
+	 * This is the method which converts the model into a set of facts to be
+	 * inserted into working memory.
+	 * 
+	 *  The objects are created asserted. Any agenda filters required are added.
+	 *  The tests are executed and the result set is populated.
+	 *
+	 */
+	private void parseTestSuite () throws RuleTestLanguageException {
+		
+	}
 }




More information about the jboss-svn-commits mailing list