@Test public void testPostUpdatedRecordedWatchedStatusDynamicUseCaseObservableHappyCase() { Map<String, Object> parameters = new HashMap<>(); parameters.put( "WATCHED", FAKE_WATCHED ); postUpdatedWatchedStatus.buildUseCaseObservable( parameters ); verify( mockMediaItemRepository ).updateWatchedStatus( FAKE_MEDIA, FAKE_ID, FAKE_WATCHED ); verifyNoMoreInteractions( mockMediaItemRepository ); verifyZeroInteractions( mockMediaItemRepository ); verifyZeroInteractions( mockThreadExecutor ); verifyZeroInteractions( mockPostExecutionThread ); }
@Override protected Observable buildUseCaseObservable( Map parameters ) { final boolean watched = (Boolean) parameters.get( "WATCHED" ); return mediaItemRepository.updateWatchedStatus( this.media, this.id, watched ); }
PostUpdatedWatchedStatus extends DynamicUseCase { @Override protected Observable buildUseCaseObservable( Map parameters ) { final boolean watched = (Boolean) parameters.get( "WATCHED" ); return mediaItemRepository.updateWatchedStatus( this.media, this.id, watched ); } }
PostUpdatedWatchedStatus extends DynamicUseCase { @Override protected Observable buildUseCaseObservable( Map parameters ) { final boolean watched = (Boolean) parameters.get( "WATCHED" ); return mediaItemRepository.updateWatchedStatus( this.media, this.id, watched ); } PostUpdatedWatchedStatus( final Media media, final int id, final MediaItemRepository mediaItemRepository, ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread ); }
PostUpdatedWatchedStatus extends DynamicUseCase { @Override protected Observable buildUseCaseObservable( Map parameters ) { final boolean watched = (Boolean) parameters.get( "WATCHED" ); return mediaItemRepository.updateWatchedStatus( this.media, this.id, watched ); } PostUpdatedWatchedStatus( final Media media, final int id, final MediaItemRepository mediaItemRepository, ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread );  }
PostUpdatedWatchedStatus extends DynamicUseCase { @Override protected Observable buildUseCaseObservable( Map parameters ) { final boolean watched = (Boolean) parameters.get( "WATCHED" ); return mediaItemRepository.updateWatchedStatus( this.media, this.id, watched ); } PostUpdatedWatchedStatus( final Media media, final int id, final MediaItemRepository mediaItemRepository, ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread );   }