@Test public void test_jar_downloader() throws Exception { ServerConnection connection = mock(ServerConnection.class); JarDownloader.ScannerFileDownloader downloader = new JarDownloader.ScannerFileDownloader(connection); File toFile = temp.newFile(); downloader.download("squid.jar", toFile); verify(connection).downloadFile("/batch/file?name=squid.jar", toFile.toPath()); }
List<File> download() { List<File> files = new ArrayList<>(); logger.debug("Extract sonar-scanner-api-batch in temp..."); files.add(jarExtractor.extractToTemp("sonar-scanner-api-batch").toFile()); files.addAll(getScannerEngineFiles()); return files; }
JarDownloader { List<File> download() { List<File> files = new ArrayList<>(); logger.debug("Extract sonar-scanner-api-batch in temp..."); files.add(jarExtractor.extractToTemp("sonar-scanner-api-batch").toFile()); files.addAll(getScannerEngineFiles()); return files; } }
JarDownloader { List<File> download() { List<File> files = new ArrayList<>(); logger.debug("Extract sonar-scanner-api-batch in temp..."); files.add(jarExtractor.extractToTemp("sonar-scanner-api-batch").toFile()); files.addAll(getScannerEngineFiles()); return files; } JarDownloader(ScannerFileDownloader scannerFileDownloader, BootstrapIndexDownloader bootstrapIndexDownloader, FileCache fileCache, JarExtractor jarExtractor, Logger logger); }
JarDownloader { List<File> download() { List<File> files = new ArrayList<>(); logger.debug("Extract sonar-scanner-api-batch in temp..."); files.add(jarExtractor.extractToTemp("sonar-scanner-api-batch").toFile()); files.addAll(getScannerEngineFiles()); return files; } JarDownloader(ScannerFileDownloader scannerFileDownloader, BootstrapIndexDownloader bootstrapIndexDownloader, FileCache fileCache, JarExtractor jarExtractor, Logger logger);  }
JarDownloader { List<File> download() { List<File> files = new ArrayList<>(); logger.debug("Extract sonar-scanner-api-batch in temp..."); files.add(jarExtractor.extractToTemp("sonar-scanner-api-batch").toFile()); files.addAll(getScannerEngineFiles()); return files; } JarDownloader(ScannerFileDownloader scannerFileDownloader, BootstrapIndexDownloader bootstrapIndexDownloader, FileCache fileCache, JarExtractor jarExtractor, Logger logger);   }