If you do that, you won't be unit-testing the rule as it
operates in cahoots with all other rules :-)
You could put that rule on a DRL file of its own and compile,
create the KB and run the session.
There should be a way to manipulate a Knowledge Package,
handle rules one by one. But that's not a
OK Agreed. I can definitely work with that.
Thanks Again.
But my main problem is that the LHS for all the rules in my dslr files fires
as soon as I execute.
kieSession.insert(output);
I want only the LHS for the rule that I am unit testing to fire.
Is there any way to do that?
--
View this
You don't lose anything when you use a stateful session, most
certainly not for unit-testing a rule.
-W
On 21/04/2014, alanvarghese wrote:
> Thank you that was a big help.
> But I see that I cannot use a StatelessKieSession to do that.
>
> I have to use a Stateful Session.
> Is there anyway I ca
Thank you that was a big help.
But I see that I cannot use a StatelessKieSession to do that.
I have to use a Stateful Session.
Is there anyway I can use a StatelessKieSession to unit test a single rule?
--
View this message in context:
http://drools.46999.n3.nabble.com/Unit-testing-a-Single-ru
Implement the interface org.kie.api.runtime.rule.AgendaFilter
and pass it in with fireAllRules.
-W
On 21/04/2014, alanvarghese wrote:
> Hi There,
>
> I want to unit test a single rule from a set of multiple rules within
> multiple DRL files.
> Is there a way to do that?
> I am using
>
> Drools 6
Hi There,
I want to unit test a single rule from a set of multiple rules within
multiple DRL files.
Is there a way to do that?
I am using
Drools 6.0.0.Final
and
StatelessKieSession
Thanks
Alan
--
View this message in context:
http://drools.46999.n3.nabble.com/Unit-testing-a-Single-rule-fro