This project is read-only.

FactBasedRuleEngineStep not passing facts to PolicyTester


I'm using BizUnit 4.0 ( to create unit tests for my BRE policies. Unfortunately when the test is executed, I receive an exception "BizUnit.TestStepExecutionException: BizUnit encountered an error executing a test step ---> System.NullReferenceException: Object reference not set to an instance of an object."
I tracked this down to the FactBasedRuleEngineStep, in particular it appears to be because the Execute method uses a switch statement based on currentFact.GetType().ToString() to determine how to create and pass BRE facts to the PolicyTester, but the specific cases look like they expect only the type's Name (eg "ObjectFact"), not its Fullname (eg "BizUnit.TestSteps.BizTalk.Bre.ObjectFact") which is what ToString() returns... hence no cases in the switch statement match, and no facts are passed into the PolicyTester.


eckythump wrote Jun 23, 2014 at 4:44 PM

Any workaround for this?