cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone have an example of using Mockito within your Nuxeo code?

Chris_Foran
Champ in-the-making
Champ in-the-making

I have a listener class which includes this code:

GatewayClient gatewayClient = Framework.getService(GatewayClient.class);

I want to write a junit which will invoke the listener class, and I want to mock the call to the gateway.

My first problem is I don't understand how to mock a class, which is being created inside the class I am testing.

The second problem is that I don't know if the Framwork.getService call will get in the way of the attempt to mock.

1 REPLY 1

Chris_Foran
Champ in-the-making
Champ in-the-making

I found this, which includes Mockito. Don't understand it yet, so not sure it this gives me what I want. https

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.