use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperResetTest method testResetPaused.
@Test
public void testResetPaused() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
mMediaPlayerWrapper.prepare();
mMediaPlayerWrapper.start();
mMediaPlayerWrapper.pause();
assertEquals(MediaPlayerWrapper.State.PAUSED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.reset();
assertEquals(MediaPlayerWrapper.State.IDLE, mMediaPlayerWrapper.getCurrentState());
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperStartTest method testStartInitialized.
@Test
public void testStartInitialized() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
assertEquals(MediaPlayerWrapper.State.INITIALIZED, mMediaPlayerWrapper.getCurrentState());
tryToFailStart(MediaPlayerWrapper.State.INITIALIZED);
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperStartTest method testStartStarted.
@Test
public void testStartStarted() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
mMediaPlayerWrapper.prepare();
mMediaPlayerWrapper.start();
assertEquals(MediaPlayerWrapper.State.STARTED, mMediaPlayerWrapper.getCurrentState());
tryToFailStart(MediaPlayerWrapper.State.STARTED);
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperStopTest method testStopStopped.
@Test
public void testStopStopped() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
mMediaPlayerWrapper.prepare();
mMediaPlayerWrapper.start();
mMediaPlayerWrapper.stop();
assertEquals(MediaPlayerWrapper.State.STOPPED, mMediaPlayerWrapper.getCurrentState());
tryToFailStop(MediaPlayerWrapper.State.STOPPED);
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperStopTest method testStopInitialized.
@Test
public void testStopInitialized() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
assertEquals(MediaPlayerWrapper.State.INITIALIZED, mMediaPlayerWrapper.getCurrentState());
tryToFailStop(MediaPlayerWrapper.State.INITIALIZED);
}
Aggregations