@Test public void testGetArgumentsAsMap() { System.out.println("getArgumentsAsMap"); VariablesFromCSV instance = new VariablesFromCSV(); instance.setFileName(fileName); instance.setSeparator(","); Map result = instance.getArgumentsAsMap(); assertEquals(result.size(), 2); }
@Override public Map<String, String> getArgumentsAsMap() { Map<String, String> variables = new VariableFromCsvFileReader(getFileName()).getDataAsMap(getVariablePrefix(), getSeparator(), getSkipLines()); if (isStoreAsSystemProperty()) { for (Map.Entry<String, String> element : variables.entrySet()) { String variable = element.getKey(); if (System.getProperty(variable) == null) { System.setProperty(variable, element.getValue()); } } } return variables; }
VariablesFromCSV extends Arguments { @Override public Map<String, String> getArgumentsAsMap() { Map<String, String> variables = new VariableFromCsvFileReader(getFileName()).getDataAsMap(getVariablePrefix(), getSeparator(), getSkipLines()); if (isStoreAsSystemProperty()) { for (Map.Entry<String, String> element : variables.entrySet()) { String variable = element.getKey(); if (System.getProperty(variable) == null) { System.setProperty(variable, element.getValue()); } } } return variables; } }
VariablesFromCSV extends Arguments { @Override public Map<String, String> getArgumentsAsMap() { Map<String, String> variables = new VariableFromCsvFileReader(getFileName()).getDataAsMap(getVariablePrefix(), getSeparator(), getSkipLines()); if (isStoreAsSystemProperty()) { for (Map.Entry<String, String> element : variables.entrySet()) { String variable = element.getKey(); if (System.getProperty(variable) == null) { System.setProperty(variable, element.getValue()); } } } return variables; }  }
VariablesFromCSV extends Arguments { @Override public Map<String, String> getArgumentsAsMap() { Map<String, String> variables = new VariableFromCsvFileReader(getFileName()).getDataAsMap(getVariablePrefix(), getSeparator(), getSkipLines()); if (isStoreAsSystemProperty()) { for (Map.Entry<String, String> element : variables.entrySet()) { String variable = element.getKey(); if (System.getProperty(variable) == null) { System.setProperty(variable, element.getValue()); } } } return variables; }  @Override Map<String, String> getArgumentsAsMap(); String getVariablePrefix(); void setVariablePrefix(String prefix); String getFileName(); void setFileName(String filename); String getSeparator(); void setSeparator(String separator); int getSkipLines(); void setSkipLines(int skipLines); boolean isStoreAsSystemProperty(); void setStoreAsSystemProperty(boolean storeAsSysProp); }
VariablesFromCSV extends Arguments { @Override public Map<String, String> getArgumentsAsMap() { Map<String, String> variables = new VariableFromCsvFileReader(getFileName()).getDataAsMap(getVariablePrefix(), getSeparator(), getSkipLines()); if (isStoreAsSystemProperty()) { for (Map.Entry<String, String> element : variables.entrySet()) { String variable = element.getKey(); if (System.getProperty(variable) == null) { System.setProperty(variable, element.getValue()); } } } return variables; }  @Override Map<String, String> getArgumentsAsMap(); String getVariablePrefix(); void setVariablePrefix(String prefix); String getFileName(); void setFileName(String filename); String getSeparator(); void setSeparator(String separator); int getSkipLines(); void setSkipLines(int skipLines); boolean isStoreAsSystemProperty(); void setStoreAsSystemProperty(boolean storeAsSysProp); static final String VARIABLE_PREFIX; static final String FILENAME; static final String SEPARATOR; static final String SKIP_LINES; static final int SKIP_LINES_DEFAULT; static final String STORE_SYS_PROP; }