@Test public void videoRunnablesRun_whenCurrentTimeLessThanTwoSeconds_shouldNotFireStartTracker() throws Exception { VastVideoConfiguration vastVideoConfiguration = new VastVideoConfiguration(); vastVideoConfiguration.setDiskMediaFileUrl("disk_video_path"); vastVideoConfiguration.addAbsoluteTrackers(Arrays.asList(new VastAbsoluteProgressTracker("start", 2000))); bundle.putSerializable(VAST_VIDEO_CONFIGURATION, vastVideoConfiguration); initializeSubject(); spyOnVideoView(); setVideoViewParams(1999, 100000); subject.onResume(); assertThat(Robolectric.getUiThreadScheduler().enqueuedTaskCount()).isEqualTo(2); Robolectric.getUiThreadScheduler().runTasks(2); assertThat(Robolectric.getUiThreadScheduler().enqueuedTaskCount()).isEqualTo(2); verifyZeroInteractions(mockRequestQueue); assertThat(Robolectric.getUiThreadScheduler().enqueuedTaskCount()).isEqualTo(2); Robolectric.getUiThreadScheduler().runTasks(2); verifyZeroInteractions(mockRequestQueue); }
@Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } VastVideoViewController(final Context context,
            final Bundle bundle,
            final long broadcastIdentifier,
            final BaseVideoViewControllerListener baseVideoViewControllerListener); }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } VastVideoViewController(final Context context,
            final Bundle bundle,
            final long broadcastIdentifier,
            final BaseVideoViewControllerListener baseVideoViewControllerListener); @Override boolean backButtonEnabled(); @Override void onComplete(String url, DownloadResponse downloadResponse); }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } VastVideoViewController(final Context context,
            final Bundle bundle,
            final long broadcastIdentifier,
            final BaseVideoViewControllerListener baseVideoViewControllerListener); @Override boolean backButtonEnabled(); @Override void onComplete(String url, DownloadResponse downloadResponse);  }