@Test public void testInstallInputEmptyListNameInPropertiesFileExpectsNotAddedToService() throws Exception { File file = getResourceFile("/ListProvidersScannerTest-EmptyListName.properties"); listProvidersScanner.install(file); assertFalse("Provider should not be added without a name", listProvidersService.hasProvider(listName)); }
@Override public void install(File artifact) { String filePath = artifact.getAbsolutePath(); logger.info("Installing list provider {}", filePath); Properties properties; try { properties = readProperties(artifact); } catch (IOException e) { logger.error("Unable to read file " + filePath); return; } addResourceListProvider(filePath, properties); }
ListProvidersScanner implements ArtifactInstaller { @Override public void install(File artifact) { String filePath = artifact.getAbsolutePath(); logger.info("Installing list provider {}", filePath); Properties properties; try { properties = readProperties(artifact); } catch (IOException e) { logger.error("Unable to read file " + filePath); return; } addResourceListProvider(filePath, properties); } }
ListProvidersScanner implements ArtifactInstaller { @Override public void install(File artifact) { String filePath = artifact.getAbsolutePath(); logger.info("Installing list provider {}", filePath); Properties properties; try { properties = readProperties(artifact); } catch (IOException e) { logger.error("Unable to read file " + filePath); return; } addResourceListProvider(filePath, properties); }  }
ListProvidersScanner implements ArtifactInstaller { @Override public void install(File artifact) { String filePath = artifact.getAbsolutePath(); logger.info("Installing list provider {}", filePath); Properties properties; try { properties = readProperties(artifact); } catch (IOException e) { logger.error("Unable to read file " + filePath); return; } addResourceListProvider(filePath, properties); }  void setListProvidersService(ListProvidersService listProvidersService); @Override boolean canHandle(File artifact); @Override void install(File artifact); @Override void update(File artifact); @Override void uninstall(File artifact); }
ListProvidersScanner implements ArtifactInstaller { @Override public void install(File artifact) { String filePath = artifact.getAbsolutePath(); logger.info("Installing list provider {}", filePath); Properties properties; try { properties = readProperties(artifact); } catch (IOException e) { logger.error("Unable to read file " + filePath); return; } addResourceListProvider(filePath, properties); }  void setListProvidersService(ListProvidersService listProvidersService); @Override boolean canHandle(File artifact); @Override void install(File artifact); @Override void update(File artifact); @Override void uninstall(File artifact); static final String LIST_PROVIDERS_DIRECTORY; static final String LIST_NAME_KEY; static final String LIST_TRANSLATABLE_KEY; static final String LIST_ORG_KEY; static final String LIST_DEFAULT_KEY; }