com.google.api.services.youtube.model.ChannelListResponse

Here are the examples of the java api class com.google.api.services.youtube.model.ChannelListResponse taken from open source projects.

1. YoutubeChannelDataCollectorTest#createMockResponse()

View license
private ChannelListResponse createMockResponse() {
    ChannelListResponse response = new ChannelListResponse();
    List<Channel> channelList = Lists.newLinkedList();
    response.setItems(channelList);
    Channel channel = new Channel();
    channel.setId(ID);
    channelList.add(channel);
    return response;
}

2. YoutubeChannelDataCollectorTest#createMockChannelsList()

View license
private YouTube.Channels.List createMockChannelsList() throws Exception {
    YouTube.Channels.List mockList = mock(YouTube.Channels.List.class);
    when(mockList.setId(anyString())).thenReturn(mockList);
    when(mockList.setKey(anyString())).thenReturn(mockList);
    ChannelListResponse response = createMockResponse();
    when(mockList.execute()).thenReturn(response);
    return mockList;
}