Sat
Sat

Reputation: 4158

How to simulate a class using WireMock?

I have a class AMSClient, which I want to simulate using WireMock. I have seen some examples but I couldn't understand them, as they are using port numbers. Can any one tell me how to simulate a class using WireMock.

Upvotes: 0

Views: 1169

Answers (2)

Sat
Sat

Reputation: 4158

Using power mockito concept, I solved this issue

https://examples.javacodegeeks.com/core-java/mockito/powermock-mockito-integration-example/

Upvotes: 0

Tom
Tom

Reputation: 4149

WireMock isn't an object mocking tool. If you're looking to mock a class or interface I'd suggest looking at Mockito.

However, if the class/interface in question wraps HTTP calls to another service, then WireMock can help by mimicking the HTTP responses from the service.

Upvotes: 1

Related Questions