use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperResetTest method testResetStopped.
@Test
public void testResetStopped() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
mMediaPlayerWrapper.prepare();
mMediaPlayerWrapper.start();
mMediaPlayerWrapper.stop();
assertEquals(MediaPlayerWrapper.State.STOPPED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.reset();
assertEquals(MediaPlayerWrapper.State.IDLE, mMediaPlayerWrapper.getCurrentState());
}
use of android.content.res.AssetFileDescriptor in project VideoPlayerManager by danylovolokh.
the class MediaPlayerWrapperResetTest method testResetInitialized.
@Test
public void testResetInitialized() throws Exception {
mMediaPlayerWrapper.setDataSource(new AssetFileDescriptor(ParcelFileDescriptor.adoptFd(0), 0, 0));
assertEquals(MediaPlayerWrapper.State.INITIALIZED, mMediaPlayerWrapper.getCurrentState());
mMediaPlayerWrapper.reset();
assertEquals(MediaPlayerWrapper.State.IDLE, mMediaPlayerWrapper.getCurrentState());
}
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);
}
Aggregations