@Test public void testGetProgramEntityDetailsFromApi() { ProgramEntity fakeProgramEntity = createFakeProgramEntity(); Observable<ProgramEntity> fakeObservable = Observable.just( fakeProgramEntity ); given( mockDvrApi.recordedProgramById( FAKE_RECORDED_ID, -1, null ) ).willReturn( fakeObservable ); masterBackendDvrDataStore.recordedProgramEntityDetails( FAKE_RECORDED_ID ); verify( mockDvrApi ).recordedProgramById( FAKE_RECORDED_ID, -1, null ); }
@Override public Observable<ProgramEntity> recordedProgramEntityDetails( final int recordedId ) { Log.d( TAG, "recordedProgramEntityDetails : enter" ); Log.d( TAG, "recordedProgramEntityList : recordedId=" + recordedId ); return this.api.recordedProgramById( recordedId, -1, null ) .doOnError( e -> Log.e( TAG, "recordedProgramEntityList : error", e ) ); }
MasterBackendDvrDataStore implements DvrDataStore { @Override public Observable<ProgramEntity> recordedProgramEntityDetails( final int recordedId ) { Log.d( TAG, "recordedProgramEntityDetails : enter" ); Log.d( TAG, "recordedProgramEntityList : recordedId=" + recordedId ); return this.api.recordedProgramById( recordedId, -1, null ) .doOnError( e -> Log.e( TAG, "recordedProgramEntityList : error", e ) ); } }
MasterBackendDvrDataStore implements DvrDataStore { @Override public Observable<ProgramEntity> recordedProgramEntityDetails( final int recordedId ) { Log.d( TAG, "recordedProgramEntityDetails : enter" ); Log.d( TAG, "recordedProgramEntityList : recordedId=" + recordedId ); return this.api.recordedProgramById( recordedId, -1, null ) .doOnError( e -> Log.e( TAG, "recordedProgramEntityList : error", e ) ); } MasterBackendDvrDataStore( final DvrApi api ); }
MasterBackendDvrDataStore implements DvrDataStore { @Override public Observable<ProgramEntity> recordedProgramEntityDetails( final int recordedId ) { Log.d( TAG, "recordedProgramEntityDetails : enter" ); Log.d( TAG, "recordedProgramEntityList : recordedId=" + recordedId ); return this.api.recordedProgramById( recordedId, -1, null ) .doOnError( e -> Log.e( TAG, "recordedProgramEntityList : error", e ) ); } MasterBackendDvrDataStore( final DvrApi api ); @Override Observable<List<TitleInfoEntity>> titleInfoEntityList(); @Override Observable<List<ProgramEntity>> recordedProgramEntityList( final boolean descending, final int startIndex, final int count, final String titleRegEx, final String recGroup, final String storageGroup ); @Override Observable<ProgramEntity> recordedProgramEntityDetails( final int recordedId ); @Override Observable<List<ProgramEntity>> upcomingProgramEntityList( final int startIndex, final int count, final boolean showAll, final int recordId, final int recStatus ); @Override Observable<List<EncoderEntity>> encoderEntityList(); @Override Observable<Boolean> updateWatchedStatus( final int id, final boolean watched ); @Override Observable<Long> getBookmark( final int recordedId, final String offsetType ); }
MasterBackendDvrDataStore implements DvrDataStore { @Override public Observable<ProgramEntity> recordedProgramEntityDetails( final int recordedId ) { Log.d( TAG, "recordedProgramEntityDetails : enter" ); Log.d( TAG, "recordedProgramEntityList : recordedId=" + recordedId ); return this.api.recordedProgramById( recordedId, -1, null ) .doOnError( e -> Log.e( TAG, "recordedProgramEntityList : error", e ) ); } MasterBackendDvrDataStore( final DvrApi api ); @Override Observable<List<TitleInfoEntity>> titleInfoEntityList(); @Override Observable<List<ProgramEntity>> recordedProgramEntityList( final boolean descending, final int startIndex, final int count, final String titleRegEx, final String recGroup, final String storageGroup ); @Override Observable<ProgramEntity> recordedProgramEntityDetails( final int recordedId ); @Override Observable<List<ProgramEntity>> upcomingProgramEntityList( final int startIndex, final int count, final boolean showAll, final int recordId, final int recStatus ); @Override Observable<List<EncoderEntity>> encoderEntityList(); @Override Observable<Boolean> updateWatchedStatus( final int id, final boolean watched ); @Override Observable<Long> getBookmark( final int recordedId, final String offsetType );  }