@Test public void getNumberFromDir_ShouldThrowException_IfPathDoesNotContainNumber() throws Exception { Path dir = inputDir.resolve("error"); assertThatExceptionOfType(NumberFormatException.class).isThrownBy(() -> subject.getNumberFromDir(dir)); }
int getNumberFromDir(Path path) { return Integer.parseInt(path.getFileName().toString()); }
MediaScanServiceImpl implements MediaScanService { int getNumberFromDir(Path path) { return Integer.parseInt(path.getFileName().toString()); } }
MediaScanServiceImpl implements MediaScanService { int getNumberFromDir(Path path) { return Integer.parseInt(path.getFileName().toString()); } @Inject  MediaScanServiceImpl(MediaScanConfig scanConfig,
                         Provider<FileScanner> scannerProvider); }
MediaScanServiceImpl implements MediaScanService { int getNumberFromDir(Path path) { return Integer.parseInt(path.getFileName().toString()); } @Inject  MediaScanServiceImpl(MediaScanConfig scanConfig,
                         Provider<FileScanner> scannerProvider); @Override Map<Path, List<Media>> retrieveFiles(); @Override List<Media> retrieveFilesAsList(); }
MediaScanServiceImpl implements MediaScanService { int getNumberFromDir(Path path) { return Integer.parseInt(path.getFileName().toString()); } @Inject  MediaScanServiceImpl(MediaScanConfig scanConfig,
                         Provider<FileScanner> scannerProvider); @Override Map<Path, List<Media>> retrieveFiles(); @Override List<Media> retrieveFilesAsList();  }