Top "Mockwebserver" questions

A library for testing HTTP and HTTPS clients.

Square retrofit server mock for testing

What's the best way to mock a server for testing when using the square retrofit framework. Potential ways: Create a …

android testing mocking retrofit mockwebserver
Simulate no network using Retrofit and MockWebServer

I want to simulate the no network case when using RetroFit and MockWebServer. Im currently testing using Espresso and supplying …

android retrofit mockwebserver
OkHttp MockWebServer fails to accept connections when restarted

I'm using the OkHttp MockWebServer to mock my server responses for unit tests. It works great for the first test, …

java android unit-testing okhttp mockwebserver
How can I verify the content of a POST Body with MockWebServer?

I have several unit tests that use Squares OkHttps MockWebServer. The tests run all fine, and everything works very well. …

junit junit4 okhttp retrofit2 mockwebserver
Moshi Retrofit error: "Expected a string but was BEGIN_OBJECT"

I built my Retrofit instance like this: Retrofit retrofit = new Retrofit.Builder() .baseUrl(server.url("/")) .addConverterFactory(MoshiConverterFactory.create(moshi)) .build(); …

android retrofit2 mockwebserver moshi