@Test public void shouldReturnTrueSignedIn() throws Exception { assertThat(Douban.isLogged(), equalTo(false)); authenticationGateway.signIn(loginParams, new Callback()); apiGateway.simulateTextResponse(200, TestResponses.AUTH_SUCCESS, null); assertThat(Douban.isLogged(), equalTo(true)); }
public void signIn(LoginParams login, Callback responseCallback) { apiGateway.makeRequest(new AuthenticationRequest(login), new AuthenticationApiResponseCallback(responseCallback, this, douban)); }
AuthenticationGateway extends BaseApiGateway { public void signIn(LoginParams login, Callback responseCallback) { apiGateway.makeRequest(new AuthenticationRequest(login), new AuthenticationApiResponseCallback(responseCallback, this, douban)); } }
AuthenticationGateway extends BaseApiGateway { public void signIn(LoginParams login, Callback responseCallback) { apiGateway.makeRequest(new AuthenticationRequest(login), new AuthenticationApiResponseCallback(responseCallback, this, douban)); } AuthenticationGateway(Douban douban, ApiGateway apiGateway); }
AuthenticationGateway extends BaseApiGateway { public void signIn(LoginParams login, Callback responseCallback) { apiGateway.makeRequest(new AuthenticationRequest(login), new AuthenticationApiResponseCallback(responseCallback, this, douban)); } AuthenticationGateway(Douban douban, ApiGateway apiGateway); void signOut(); void signIn(LoginParams login, Callback responseCallback); }
AuthenticationGateway extends BaseApiGateway { public void signIn(LoginParams login, Callback responseCallback) { apiGateway.makeRequest(new AuthenticationRequest(login), new AuthenticationApiResponseCallback(responseCallback, this, douban)); } AuthenticationGateway(Douban douban, ApiGateway apiGateway); void signOut(); void signIn(LoginParams login, Callback responseCallback); static final Gson GSON; }