@Test public void replaceInput_ShouldReplaceInput_WithBasePath() throws Exception { Path input = getPath("0", "video.mkv"); when(profile.getArguments()).thenReturn(Arrays.asList()); String result = subject.replaceInput( TranscodingServiceImpl.INPUT_PLACEHOLDER, input); assertThat(result).isEqualTo(transcoderConfig.base_input_dir().resolve(input).toString()); }
String replaceInput(String s, Path path) { return s.replace(INPUT_PLACEHOLDER, transcoderConfig.base_input_dir().resolve(path).toString()); }
TranscodingServiceImpl implements TranscodingService { String replaceInput(String s, Path path) { return s.replace(INPUT_PLACEHOLDER, transcoderConfig.base_input_dir().resolve(path).toString()); } }
TranscodingServiceImpl implements TranscodingService { String replaceInput(String s, Path path) { return s.replace(INPUT_PLACEHOLDER, transcoderConfig.base_input_dir().resolve(path).toString()); } @Inject  TranscodingServiceImpl(TranscoderConfig transcoderConfig); }
TranscodingServiceImpl implements TranscodingService { String replaceInput(String s, Path path) { return s.replace(INPUT_PLACEHOLDER, transcoderConfig.base_input_dir().resolve(path).toString()); } @Inject  TranscodingServiceImpl(TranscoderConfig transcoderConfig); @Override void transcode(TranscodeTask task); @Override @Synchronized boolean cancelTranscode(); @Override Flowable<TranscodeBeginEvent> onTranscodeBegin(); @Override Flowable<TranscodeFinishedEvent> onTranscodeFinished(); @Override Observable<TranscodeReport> onProgressUpdated(); @Override TranscodingService onProgressUpdated(Consumer<TranscodeReport> listener); @Override TranscodingService onTranscodeFinished(Consumer<TranscodeFinishedEvent> listener); @Override TranscodingService onTranscodeBegin(Consumer<TranscodeBeginEvent> listener); }
TranscodingServiceImpl implements TranscodingService { String replaceInput(String s, Path path) { return s.replace(INPUT_PLACEHOLDER, transcoderConfig.base_input_dir().resolve(path).toString()); } @Inject  TranscodingServiceImpl(TranscoderConfig transcoderConfig); @Override void transcode(TranscodeTask task); @Override @Synchronized boolean cancelTranscode(); @Override Flowable<TranscodeBeginEvent> onTranscodeBegin(); @Override Flowable<TranscodeFinishedEvent> onTranscodeFinished(); @Override Observable<TranscodeReport> onProgressUpdated(); @Override TranscodingService onProgressUpdated(Consumer<TranscodeReport> listener); @Override TranscodingService onTranscodeFinished(Consumer<TranscodeFinishedEvent> listener); @Override TranscodingService onTranscodeBegin(Consumer<TranscodeBeginEvent> listener); static final String OUTPUT_PLACEHOLDER; static final String INPUT_PLACEHOLDER; }