@Test public void shouldCallOnFailureWhenResponseBodyEmpty() throws Exception { authorityGetCaptchaGateway.newCaptchaId(new Callback()); apiGateway.simulateTextResponse(200, TestResponses.NULL_RESP, null); assertNotNull(authorityGetCaptchaGateway.failureResponse); assertThat(douban.mApiRespErrorCode.getCode(),equalTo(ApiInternalError.INTERNAL_ERROR.getCode())); }
public void newCaptchaId(Callback callback) { apiGateway.makeRequest(new AuthGetCaptchaRequest(), new AuthorityGetCaptchaCallback(callback, this, douban)); }
AuthorityGetCaptchaGateway extends BaseApiGateway { public void newCaptchaId(Callback callback) { apiGateway.makeRequest(new AuthGetCaptchaRequest(), new AuthorityGetCaptchaCallback(callback, this, douban)); } }
AuthorityGetCaptchaGateway extends BaseApiGateway { public void newCaptchaId(Callback callback) { apiGateway.makeRequest(new AuthGetCaptchaRequest(), new AuthorityGetCaptchaCallback(callback, this, douban)); } AuthorityGetCaptchaGateway(Douban douban, ApiGateway apiGateway); }
AuthorityGetCaptchaGateway extends BaseApiGateway { public void newCaptchaId(Callback callback) { apiGateway.makeRequest(new AuthGetCaptchaRequest(), new AuthorityGetCaptchaCallback(callback, this, douban)); } AuthorityGetCaptchaGateway(Douban douban, ApiGateway apiGateway); void newCaptchaId(Callback callback); }
AuthorityGetCaptchaGateway extends BaseApiGateway { public void newCaptchaId(Callback callback) { apiGateway.makeRequest(new AuthGetCaptchaRequest(), new AuthorityGetCaptchaCallback(callback, this, douban)); } AuthorityGetCaptchaGateway(Douban douban, ApiGateway apiGateway); void newCaptchaId(Callback callback); static final Gson GSON; }