Search in sources :

Example 1 with PlaylistService

use of net.rdrei.android.scdl2.api.service.PlaylistService in project scdl by passy.

the class PlaylistServiceTest method testShouldCreateService.

@Test
public void testShouldCreateService() {
    final PlaylistService service = mServiceManager.playlistService();
    assertThat(service, notNullValue());
}
Also used : PlaylistService(net.rdrei.android.scdl2.api.service.PlaylistService) Test(org.junit.Test)

Example 2 with PlaylistService

use of net.rdrei.android.scdl2.api.service.PlaylistService in project scdl by passy.

the class PlaylistServiceTest method shouldResolvePlaylist.

@Test
public void shouldResolvePlaylist() throws APIException {
    final PlaylistService service = mServiceManager.playlistService();
    final PlaylistEntity entity = service.getPlaylist("13028824");
    assertThat(entity.getDescription(), startsWith("At the tail end of 2013, few summer anthems"));
    assertThat(entity.getTracks().get(0).getId(), equalTo(116980406l));
}
Also used : PlaylistEntity(net.rdrei.android.scdl2.api.entity.PlaylistEntity) PlaylistService(net.rdrei.android.scdl2.api.service.PlaylistService) Test(org.junit.Test)

Example 3 with PlaylistService

use of net.rdrei.android.scdl2.api.service.PlaylistService in project scdl by passy.

the class ServiceManager method playlistService.

public PlaylistService playlistService() {
    final PlaylistService service = mInjector.getInstance(PlaylistService.class);
    setupService(service);
    return service;
}
Also used : PlaylistService(net.rdrei.android.scdl2.api.service.PlaylistService)

Aggregations

PlaylistService (net.rdrei.android.scdl2.api.service.PlaylistService)3 Test (org.junit.Test)2 PlaylistEntity (net.rdrei.android.scdl2.api.entity.PlaylistEntity)1