Anyone have an example of using Mockito within your Nuxeo code?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 12:19 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 04:34 PM
I found this, which includes Mockito. Don't understand it yet, so not sure it this gives me what I want. https
