@Test public void replaceOutput_ShouldReplaceOutput_WithNewValue() throws Exception { Path output = getPath("tmp", "video.mp4"); when(profile.getArguments()).thenReturn(Collections.singletonList(TranscodingServiceImpl.OUTPUT_PLACEHOLDER)); String result = subject.replaceOutput( TranscodingServiceImpl.OUTPUT_PLACEHOLDER, output ); assertThat(result).isEqualTo(output.toString()); }
String replaceOutput(String s, Path path) { return s.replace(OUTPUT_PLACEHOLDER, path.toString()); }
TranscodingServiceImpl implements TranscodingService { String replaceOutput(String s, Path path) { return s.replace(OUTPUT_PLACEHOLDER, path.toString()); } }
TranscodingServiceImpl implements TranscodingService { String replaceOutput(String s, Path path) { return s.replace(OUTPUT_PLACEHOLDER, path.toString()); } @Inject  TranscodingServiceImpl(TranscoderConfig transcoderConfig); }
TranscodingServiceImpl implements TranscodingService { String replaceOutput(String s, Path path) { return s.replace(OUTPUT_PLACEHOLDER, 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 replaceOutput(String s, Path path) { return s.replace(OUTPUT_PLACEHOLDER, 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; }