Kong/unirest-java

Mocking Unirest in Junit5

vamsi-6579 opened this issue · 4 comments

A clear and concise description of what the problem is,
I'm always frustrated when I'm trying to mock the Unirest call in Junit5
Provide features to mock the Unirest by updating the dependency or by adding a new dependency

ryber commented

There is a mocking module that has existed for the last 3 years: https://github.com/Kong/unirest-java/tree/main/unirest-mocks

we are using mashape import which is old,
But after changing to this import

com.konghq
unirest-java-core
4.0.3
provided

Iam unable to import MockClient

ryber commented

you need to pull in the mocking module, its its own dependency