@Test public void execute_native() { SonarScanner build = SonarScanner.create().useNative(); String classifier = build.classifier(); assertThat(classifier).isNotEmpty(); Map<String, String> props = new TreeMap<>(); SonarScannerInstaller installer = mock(SonarScannerInstaller.class); when(installer.install(eq(build.scannerVersion()), eq(classifier), any(), eq(false))) .thenReturn(new File("dummy.sh")); CommandExecutor executor = mock(CommandExecutor.class); new SonarScannerExecutor().execute(build, Configuration.create(), props, installer, executor); verify(installer).install(eq(build.scannerVersion()), eq(classifier), any(), eq(false)); }
@Override BuildResult execute(SonarRunner build, Configuration config, Map<String, String> adjustedProperties, CommandExecutor create) { return execute(build, config, adjustedProperties, new SonarScannerInstaller(config.locators()), create); }
SonarScannerExecutor extends AbstractBuildExecutor<SonarRunner> { @Override BuildResult execute(SonarRunner build, Configuration config, Map<String, String> adjustedProperties, CommandExecutor create) { return execute(build, config, adjustedProperties, new SonarScannerInstaller(config.locators()), create); } }
SonarScannerExecutor extends AbstractBuildExecutor<SonarRunner> { @Override BuildResult execute(SonarRunner build, Configuration config, Map<String, String> adjustedProperties, CommandExecutor create) { return execute(build, config, adjustedProperties, new SonarScannerInstaller(config.locators()), create); }  }
SonarScannerExecutor extends AbstractBuildExecutor<SonarRunner> { @Override BuildResult execute(SonarRunner build, Configuration config, Map<String, String> adjustedProperties, CommandExecutor create) { return execute(build, config, adjustedProperties, new SonarScannerInstaller(config.locators()), create); }   }
SonarScannerExecutor extends AbstractBuildExecutor<SonarRunner> { @Override BuildResult execute(SonarRunner build, Configuration config, Map<String, String> adjustedProperties, CommandExecutor create) { return execute(build, config, adjustedProperties, new SonarScannerInstaller(config.locators()), create); }    }