A Lesson by Chiu-Ki Chan
The Dispatcher is a powerful way to define the desired behavior of MockWebServer. However, the syntax is a bit verbose, and spelling out responses as JSON strings is a bit clumsy. We can use the RESTMock library to make it easier.
In this lesson you will learn:
- How to set up RESTMock
- How to use Hamcrest matchers with RESTMock
- How to tell RESTMock to return the content of a file as response
- How to verify requests with RESTMock
Pro Users: Sign in to access this lessons source code