PawelAdamski / HttpClientMock

Library for mocking Apache HttpClient.
MIT License
44 stars 9 forks source link

When user set status NO_CONTETNT HttpEntity should be null. #9

Closed PawelAdamski closed 6 years ago

PawelAdamski commented 6 years ago

HttpClientMock should follow Apache Http Client behavior so with following setup:

 HttpClientMock httpClientMock = new HttpClientMock("http://localhost:8080");
 httpClientMock.onPut("/save").doReturnStatus(204);

calling httpClientMock.execute(httpGet("http://localhost:8080/save")).getEntity() should return null.

PawelAdamski commented 6 years ago

Fixed.