<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-2022-jp"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Oh and there's this in that project which is a JUnit test for the working memory event listener. Shows how it can be used.&nbsp;</div><div><a href="https://github.com/gratiartis/sctrcd-fx-web/blob/master/src/test/java/uk/co/scattercode/drools/util/TrackingWorkingMemoryEventListenerTest.java">https://github.com/gratiartis/sctrcd-fx-web/blob/master/src/test/java/uk/co/scattercode/drools/util/TrackingWorkingMemoryEventListenerTest.java</a></div><div><br></div><div>Steve</div><div><br></div><br><div><div>On 26 Mar 2013, at 20:42, Stephen Masters &lt;<a href="mailto:stephen.masters@me.com">stephen.masters@me.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-2022-jp"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Here you go:</div><div><a href="https://github.com/gratiartis/sctrcd-fx-web/blob/master/src/main/java/uk/co/scattercode/drools/util/TrackingWorkingMemoryEventListener.java">https://github.com/gratiartis/sctrcd-fx-web/blob/master/src/main/java/uk/co/scattercode/drools/util/TrackingWorkingMemoryEventListener.java</a></div><div><br></div><div>And this provides convenience methods for asserting whether rules have fired:</div><div><a href="https://github.com/gratiartis/sctrcd-fx-web/blob/master/src/main/java/uk/co/scattercode/drools/util/DroolsTestUtil.java">https://github.com/gratiartis/sctrcd-fx-web/blob/master/src/main/java/uk/co/scattercode/drools/util/DroolsTestUtil.java</a></div><div><br></div><div>Steve</div><div><br></div><br><div><div>On 26 Mar 2013, at 20:22, "Magnarelli, James" &lt;<a href="mailto:James_Magnarelli@intuit.com">James_Magnarelli@intuit.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Just to clarify, for anyone else who might offer advice, my original<br>desire was to have some kind of information about what rule fired, and<br>what object it fired for.<br><br><br>-- James<br><br><br><br><br><br><br>On 3/26/13 1:15 PM, "Grant Rettke" &lt;<a href="mailto:grettke@acm.org">grettke@acm.org</a>&gt; wrote:<br><br><blockquote type="cite">You might think differently about unit testing, set up your tests so<br>you *know* the data is there, and add or retract facts, and verify<br>their presence as a matter of success of failure.<br><br>There are also more advanced approaches that others will surely share<br>soon.<br><br>On Tue, Mar 26, 2013 at 3:11 PM, Magnarelli, James<br>&lt;<a href="mailto:James_Magnarelli@intuit.com">James_Magnarelli@intuit.com</a>&gt; wrote:<br><blockquote type="cite">Though all of those are worthy pursuits, I want to do it in the sense of<br>unit testing to make sure that I have defined the rule correctly.<br><br>Thanks for your rapid response, by the way. I really appreciate it.<br><br>-- James<br><br><br><br><br><br><br>On 3/26/13 1:08 PM, "Grant Rettke" &lt;<a href="mailto:grettke@acm.org">grettke@acm.org</a>&gt; wrote:<br><br><blockquote type="cite">Do you want to do that in the sense of unit testing to make sure you<br>have defined the rule correctly?<br><br>Or, do you want to understand more about the dynamic behavior as your<br>system executes for profiling? Or learning more about your model?<br><br>On Tue, Mar 26, 2013 at 3:05 PM, jmagnare &lt;<a href="mailto:james_magnarelli@intuit.com">james_magnarelli@intuit.com</a>&gt;<br>wrote:<br><blockquote type="cite">I'm fairly new to Drools, but a fair amount of digging and searching<br>hasn't<br>brought me closer to an answer on this:<br><br>Is there a way for me to determine, at runtime, which rules were fired<br>and<br>with what inputs?<br><br>I am looking to use this my JUnit tests, to make sure that the rules I<br>want<br>to be fired are firing when I expect them to.<br><br><br><br>--<br>View this message in context:<br><a href="http://drools.46999.n3.nabble.com/How-to-determine-which-rules-fired-un">http://drools.46999.n3.nabble.com/How-to-determine-which-rules-fired-un</a><br>de<br>r-what-conditions-for-testing-tp4023063.html<br>Sent from the Drools: User forum mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote><br><br><br>--<br>Grant Rettke | ACM, AMA, COG, IEEE<br><a href="mailto:grettke@acm.org">grettke@acm.org</a> | <a href="http://www.wisdomandwonder.com/">http://www.wisdomandwonder.com/</a><br>Wisdom begins in wonder.<br>(($B&K(B (x) (x x)) ($B&K(B (x) (x x)))<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote><br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote><br><br><br>-- <br>Grant Rettke | ACM, AMA, COG, IEEE<br><a href="mailto:grettke@acm.org">grettke@acm.org</a> | <a href="http://www.wisdomandwonder.com/">http://www.wisdomandwonder.com/</a><br>Wisdom begins in wonder.<br>(($B&K(B (x) (x x)) ($B&K(B (x) (x x)))<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote><br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br></div>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users</blockquote></div><br></body></html>