use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperPauseTest method testPauseStopped.
@Test(expected = IllegalStateException.class)
public void testPauseStopped() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
mMediaPlayerWrapper.prepare();
mMediaPlayerWrapper.start();
mMediaPlayerWrapper.stop();
assertEquals(MediaPlayerWrapper.State.STOPPED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.pause();
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperPauseTest method testPauseInitialized.
@Test(expected = IllegalStateException.class)
public void testPauseInitialized() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
assertEquals(MediaPlayerWrapper.State.INITIALIZED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.pause();
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperPrepareTest method testPrepareStopped.
@Test
public void testPrepareStopped() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
mMediaPlayerWrapper.prepare();
mMediaPlayerWrapper.start();
mMediaPlayerWrapper.stop();
assertEquals(MediaPlayerWrapper.State.STOPPED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.prepare();
assertEquals(MediaPlayerWrapper.State.PREPARED, mMediaPlayerWrapper.getCurrentState());
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperStopTest method testStopPaused.
@Test
public void testStopPaused() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
mMediaPlayerWrapper.prepare();
mMediaPlayerWrapper.start();
mMediaPlayerWrapper.pause();
assertEquals(MediaPlayerWrapper.State.PAUSED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.stop();
assertEquals(MediaPlayerWrapper.State.STOPPED, mMediaPlayerWrapper.getCurrentState());
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperPrepareTest method testPrepareInitialized.
@Test
public void testPrepareInitialized() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
assertEquals(MediaPlayerWrapper.State.INITIALIZED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.prepare();
assertEquals(MediaPlayerWrapper.State.PREPARED, mMediaPlayerWrapper.getCurrentState());
}
Aggregations