Possibly also worth pointing out that inserting a fact and executing a session 
do not connect to Guvnor anyway?

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.

Although, I must admit I’m not sure what question is being asked...

Steve


On 8 Aug 2014, at 13:07, Michael Anstis <michael.ans...@gmail.com> wrote:

> I assume you have a service encapsulating your use of Drools?
> 
> Why not mock this service to use an implementation that returns what you need?
> 
> 
> On 8 August 2014 03:13, san_hegde <santhosh.he...@hp.com> wrote:
> Hi ,
> 
>  
> 
> We have requirement where in during functional testing we do not want to 
> connect to Guvnor rather want to mock it. 
> 
>  
> 
> For example mocking could be like this.
> 
>  
> 
>                 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.
> 
>  
> 
>  
> 
> Thank you
> 
> Santhosh Hegde A
> 
> 
> View this message in context: Mocking Guvnor
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> 
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to