@Test public void downloadTest() throws CmdLineException { parser.parseArgument(); Config cfg = options.setup(); assertThat(cfg.doDownload()).isTrue(); }
Config setup() { return Config.builder() .withPlugins(getPlugins()) .withPluginDir(getPluginDir()) .withJenkinsUc(getUpdateCenter()) .withJenkinsUcExperimental(getExperimentalUpdateCenter()) .withJenkinsIncrementalsRepoMirror(getIncrementalsMirror()) .withJenkinsPluginInfo(getPluginInfo()) .withJenkinsWar(getJenkinsWar()) .withShowWarnings(isShowWarnings()) .withShowAllWarnings(isShowAllWarnings()) .withShowPluginsToBeDownloaded(isShowPluginsToBeDownloaded()) .withShowAvailableUpdates(isShowAvailableUpdates()) .withOutputFormat(getOutputFormat()) .withIsVerbose(isVerbose()) .withDoDownload(!isNoDownload()) .withUseLatestSpecified(isUseLatestSpecified()) .withUseLatestAll(isUseLatestAll()) .withSkipFailedPlugins(isSkipFailedPlugins()) .build(); }
CliOptions { Config setup() { return Config.builder() .withPlugins(getPlugins()) .withPluginDir(getPluginDir()) .withJenkinsUc(getUpdateCenter()) .withJenkinsUcExperimental(getExperimentalUpdateCenter()) .withJenkinsIncrementalsRepoMirror(getIncrementalsMirror()) .withJenkinsPluginInfo(getPluginInfo()) .withJenkinsWar(getJenkinsWar()) .withShowWarnings(isShowWarnings()) .withShowAllWarnings(isShowAllWarnings()) .withShowPluginsToBeDownloaded(isShowPluginsToBeDownloaded()) .withShowAvailableUpdates(isShowAvailableUpdates()) .withOutputFormat(getOutputFormat()) .withIsVerbose(isVerbose()) .withDoDownload(!isNoDownload()) .withUseLatestSpecified(isUseLatestSpecified()) .withUseLatestAll(isUseLatestAll()) .withSkipFailedPlugins(isSkipFailedPlugins()) .build(); } }
CliOptions { Config setup() { return Config.builder() .withPlugins(getPlugins()) .withPluginDir(getPluginDir()) .withJenkinsUc(getUpdateCenter()) .withJenkinsUcExperimental(getExperimentalUpdateCenter()) .withJenkinsIncrementalsRepoMirror(getIncrementalsMirror()) .withJenkinsPluginInfo(getPluginInfo()) .withJenkinsWar(getJenkinsWar()) .withShowWarnings(isShowWarnings()) .withShowAllWarnings(isShowAllWarnings()) .withShowPluginsToBeDownloaded(isShowPluginsToBeDownloaded()) .withShowAvailableUpdates(isShowAvailableUpdates()) .withOutputFormat(getOutputFormat()) .withIsVerbose(isVerbose()) .withDoDownload(!isNoDownload()) .withUseLatestSpecified(isUseLatestSpecified()) .withUseLatestAll(isUseLatestAll()) .withSkipFailedPlugins(isSkipFailedPlugins()) .build(); }  }
CliOptions { Config setup() { return Config.builder() .withPlugins(getPlugins()) .withPluginDir(getPluginDir()) .withJenkinsUc(getUpdateCenter()) .withJenkinsUcExperimental(getExperimentalUpdateCenter()) .withJenkinsIncrementalsRepoMirror(getIncrementalsMirror()) .withJenkinsPluginInfo(getPluginInfo()) .withJenkinsWar(getJenkinsWar()) .withShowWarnings(isShowWarnings()) .withShowAllWarnings(isShowAllWarnings()) .withShowPluginsToBeDownloaded(isShowPluginsToBeDownloaded()) .withShowAvailableUpdates(isShowAvailableUpdates()) .withOutputFormat(getOutputFormat()) .withIsVerbose(isVerbose()) .withDoDownload(!isNoDownload()) .withUseLatestSpecified(isUseLatestSpecified()) .withUseLatestAll(isUseLatestAll()) .withSkipFailedPlugins(isSkipFailedPlugins()) .build(); }  OutputFormat getOutputFormat(); boolean isShowAvailableUpdates(); boolean isVerbose(); String appendFilePathIfNotPresent(@NonNull String updateCenter); @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE") void showVersion(); boolean isShowHelp(); boolean isUseLatestSpecified(); boolean isSkipFailedPlugins(); boolean isUseLatestAll(); InputStream getPropertiesInputStream(String path); boolean isShowVersion(); }
CliOptions { Config setup() { return Config.builder() .withPlugins(getPlugins()) .withPluginDir(getPluginDir()) .withJenkinsUc(getUpdateCenter()) .withJenkinsUcExperimental(getExperimentalUpdateCenter()) .withJenkinsIncrementalsRepoMirror(getIncrementalsMirror()) .withJenkinsPluginInfo(getPluginInfo()) .withJenkinsWar(getJenkinsWar()) .withShowWarnings(isShowWarnings()) .withShowAllWarnings(isShowAllWarnings()) .withShowPluginsToBeDownloaded(isShowPluginsToBeDownloaded()) .withShowAvailableUpdates(isShowAvailableUpdates()) .withOutputFormat(getOutputFormat()) .withIsVerbose(isVerbose()) .withDoDownload(!isNoDownload()) .withUseLatestSpecified(isUseLatestSpecified()) .withUseLatestAll(isUseLatestAll()) .withSkipFailedPlugins(isSkipFailedPlugins()) .build(); }  OutputFormat getOutputFormat(); boolean isShowAvailableUpdates(); boolean isVerbose(); String appendFilePathIfNotPresent(@NonNull String updateCenter); @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE") void showVersion(); boolean isShowHelp(); boolean isUseLatestSpecified(); boolean isSkipFailedPlugins(); boolean isUseLatestAll(); InputStream getPropertiesInputStream(String path); boolean isShowVersion();  }