UpdateConfiguration { public RepositoryType repositoryTypeForLatestVersion() { return RepositoryType.valueOf(properties.getProperty(UPDATE_LATEST_VERSION_REPOSITORY_TYPE)); } UpdateConfiguration(Properties properties); String getApplicationName(); UpdateStrategy getStrategy(); String getLocationForFixedVersion(); RepositoryType repositoryTypeForLatestVersion(); String repositoryLocationForLatestVersion(); static final String UPDATE_APPLICATION_NAME; static final String UPDATE_STRATEGY; static final String UPDATE_LATEST_VERSION_REPOSITORY_TYPE; static final String UPDATE_FIXED_VERSION_LOCATION; static final String UPDATE_LATEST_VERSION_REPOSITORY_LOCATION; }
@Test public void knowsHttpRepositories() throws Exception { properties.put("update.LatestVersion.repository.type", "HTTP"); assertThat(configuration.repositoryTypeForLatestVersion(), is(RepositoryType.HTTP)); }
@Test public void knowsFileRepositories() throws Exception { properties.put("update.LatestVersion.repository.type", "File"); assertThat(configuration.repositoryTypeForLatestVersion(), is(RepositoryType.File)); }