Search in sources :

Example 1 with TrackService

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

the class TrackServiceTest method testShouldCreateService.

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

Example 2 with TrackService

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

the class TrackServiceTest method testResolveTrack.

@Test
public void testResolveTrack() throws APIException {
    final TrackService service = mServiceManager.trackService();
    TrackEntity entity = service.getTrack("44276907");
    assertThat(entity.getTitle(), equalTo("Newklear - Contaminated Selection *SPECIAL GUEST SHOW BOUNFM RADIO APRIL. 24TH*"));
}
Also used : TrackEntity(net.rdrei.android.scdl2.api.entity.TrackEntity) TrackService(net.rdrei.android.scdl2.api.service.TrackService) Test(org.junit.Test)

Example 3 with TrackService

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

the class ServiceManager method trackService.

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

Example 4 with TrackService

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

the class PurchaseEntityTest method testResolvePurchase.

@Test
public void testResolvePurchase() throws APIException {
    final TrackService service = mServiceManager.trackService();
    TrackEntity entity = service.getTrack("60200642");
    assertThat(entity.isPurchasable(), is(true));
    assertThat(entity.isDownloadable(), is(false));
    assertThat(entity.getPurchaseUrl(), equalTo("http://bit.ly/3LAU_HAUS"));
    assertThat(entity.getPurchaseTitle(), equalTo("Download on Facebook"));
}
Also used : TrackEntity(net.rdrei.android.scdl2.api.entity.TrackEntity) TrackService(net.rdrei.android.scdl2.api.service.TrackService) Test(org.junit.Test)

Aggregations

TrackService (net.rdrei.android.scdl2.api.service.TrackService)4 Test (org.junit.Test)3 TrackEntity (net.rdrei.android.scdl2.api.entity.TrackEntity)2