Search in sources :

Example 1 with AbstractMediaStateLoaderTask

use of net.rdrei.android.scdl2.ui.AbstractMediaStateLoaderTask in project scdl by passy.

the class AbstractMediaStateLoaderTaskTest method testCallForPlayList.

@Test
public void testCallForPlayList() throws Exception {
    final PendingDownload pendingDownload = new PendingDownload("1234", MediaDownloadType.PLAYLIST);
    final AbstractMediaStateLoaderTask task = new AbstractMediaStateLoaderTask(mContext, pendingDownload);
    task.call();
    verify(mPlaylistService).getPlaylist("1234");
    verifyZeroInteractions(mTrackService);
}
Also used : PendingDownload(net.rdrei.android.scdl2.api.PendingDownload) AbstractMediaStateLoaderTask(net.rdrei.android.scdl2.ui.AbstractMediaStateLoaderTask) Test(org.junit.Test)

Example 2 with AbstractMediaStateLoaderTask

use of net.rdrei.android.scdl2.ui.AbstractMediaStateLoaderTask in project scdl by passy.

the class AbstractMediaStateLoaderTaskTest method testCallForTrack.

@Test
public void testCallForTrack() throws Exception {
    final PendingDownload pendingDownload = new PendingDownload("1234", MediaDownloadType.TRACK);
    final AbstractMediaStateLoaderTask task = new AbstractMediaStateLoaderTask(mContext, pendingDownload);
    task.call();
    verify(mTrackService).getTrack("1234");
    verifyZeroInteractions(mPlaylistService);
}
Also used : PendingDownload(net.rdrei.android.scdl2.api.PendingDownload) AbstractMediaStateLoaderTask(net.rdrei.android.scdl2.ui.AbstractMediaStateLoaderTask) Test(org.junit.Test)

Aggregations

PendingDownload (net.rdrei.android.scdl2.api.PendingDownload)2 AbstractMediaStateLoaderTask (net.rdrei.android.scdl2.ui.AbstractMediaStateLoaderTask)2 Test (org.junit.Test)2