@Test public void shouldReturnUnFavSuccess() throws Exception { channelActionGateway.favAChannel(ChannelActionType.UNFAV_CHANNEL, channelId, new Callback()); apiGateway.simulateTextResponse(200, TestResponses.FAV_A_CHANNEL_JSON, null); assertNull(channelActionGateway.failureResponse); assertTrue(channelActionGateway.onCompleteWasCalled); }
public void favAChannel(ChannelActionType favChannel, int channelId, Callback callback) { apiGateway.makeRequest(new ChannelActionRequest(favChannel, channelId), new ChannelActionApiResponseCallbacks(callback, this, douban)); }
ChannelActionGateway extends BaseApiGateway { public void favAChannel(ChannelActionType favChannel, int channelId, Callback callback) { apiGateway.makeRequest(new ChannelActionRequest(favChannel, channelId), new ChannelActionApiResponseCallbacks(callback, this, douban)); } }
ChannelActionGateway extends BaseApiGateway { public void favAChannel(ChannelActionType favChannel, int channelId, Callback callback) { apiGateway.makeRequest(new ChannelActionRequest(favChannel, channelId), new ChannelActionApiResponseCallbacks(callback, this, douban)); } ChannelActionGateway(Douban douban, ApiGateway apiGateway); }
ChannelActionGateway extends BaseApiGateway { public void favAChannel(ChannelActionType favChannel, int channelId, Callback callback) { apiGateway.makeRequest(new ChannelActionRequest(favChannel, channelId), new ChannelActionApiResponseCallbacks(callback, this, douban)); } ChannelActionGateway(Douban douban, ApiGateway apiGateway); void favAChannel(ChannelActionType favChannel, int channelId, Callback callback); }
ChannelActionGateway extends BaseApiGateway { public void favAChannel(ChannelActionType favChannel, int channelId, Callback callback) { apiGateway.makeRequest(new ChannelActionRequest(favChannel, channelId), new ChannelActionApiResponseCallbacks(callback, this, douban)); } ChannelActionGateway(Douban douban, ApiGateway apiGateway); void favAChannel(ChannelActionType favChannel, int channelId, Callback callback); static final Gson GSON; }