square / retrofit

A type-safe HTTP client for Android and the JVM
https://square.github.io/retrofit/
Apache License 2.0
43.09k stars 7.3k forks source link

Documentation for MockRetrofit #1413

Open danielchristopher1 opened 8 years ago

danielchristopher1 commented 8 years ago

It is completely unclear how to use MockRetrofit to mock API responses. Will documentation be added?

ZakTaccardi commented 8 years ago

there's some unofficial documentation here - http://riggaroo.co.za/retrofit-2-mocking-http-responses/

but something more official would be nice!

JakeWharton commented 8 years ago

There's also the unit tests: https://github.com/square/retrofit/blob/master/retrofit-mock/src/test/java/retrofit2/mock/BehaviorDelegateTest.java and sample: https://github.com/square/retrofit/blob/master/samples/src/main/java/com/example/retrofit/SimpleMockService.java