<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Possibly also worth pointing out that inserting a fact and executing a session do not connect to Guvnor anyway?</div><div><br></div><div>Although, as Mike mentions, the simplest approach tends to be to create a service which wraps knowledge base access and mock that. Although you could also mock the session.</div><div><br></div><div>Although, I must admit I’m not sure what question is being asked...</div><div><br></div><div>Steve</div><div><br></div><br><div><div>On 8 Aug 2014, at 13:07, Michael Anstis &lt;<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I assume you have a service encapsulating your use of Drools?<div><br></div><div>Why not mock this service to use an implementation that returns what you need?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 8 August 2014 03:13, san_hegde <span dir="ltr">&lt;<a href="mailto:santhosh.hegde@hp.com" target="_blank">santhosh.hegde@hp.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;">







<div><p class="MsoNormal">Hi ,<u></u><u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">We have requirement where in during functional testing we do not want to connect to Guvnor rather want to mock it.&nbsp;
<u></u><u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">For example mocking could be like this.<u></u><u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We send Fact object as input during calling knowledgeSession.execute() method and in rule we update the result in that fact object itself. So here can we mock the output fact object, so that during functional testing we
 no need to connect to Guvnor rather mocked result fact object is returned.<u></u><u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal"><u></u>&nbsp;<u></u></p><p class="MsoNormal">Thank you<u></u><u></u></p><p class="MsoNormal">Santhosh Hegde A<u></u><u></u></p>
</div>




        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://drools.46999.n3.nabble.com/Mocking-Guvnor-tp4030601.html" target="_blank">Mocking Guvnor</a><br>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html" target="_blank">Drools: User forum mailing list archive</a> at <a href="http://Nabble.com">Nabble.com</a>.<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" target="_blank">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>