@Test public void shouldReturnZeroVariables() throws Exception { config = new XQueryRunConfig("<run/>"); List<XQueryRunnerVariable> result = config.getVariables(); assertThat(result.size(), is(0)); }
public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath = "/run/variables/list/variable[" + i + "]/"; XQueryRunnerVariable variable = new XQueryRunnerVariable(); variable.ACTIVE = Boolean.parseBoolean(getExpressionValue(getExpression(baseXPath + "@active"))); variable.NAME = getExpressionValue(getExpression(baseXPath + "@name")); variable.NAMESPACE = getExpressionValue(getExpression(baseXPath + "@namespace")); variable.TYPE = getExpressionValue(getExpression(baseXPath + "@type")); variable.VALUE = getExpressionValue(getExpression("string(" + baseXPath + "text())")); result.add(variable); } return result; }
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath = "/run/variables/list/variable[" + i + "]/"; XQueryRunnerVariable variable = new XQueryRunnerVariable(); variable.ACTIVE = Boolean.parseBoolean(getExpressionValue(getExpression(baseXPath + "@active"))); variable.NAME = getExpressionValue(getExpression(baseXPath + "@name")); variable.NAMESPACE = getExpressionValue(getExpression(baseXPath + "@namespace")); variable.TYPE = getExpressionValue(getExpression(baseXPath + "@type")); variable.VALUE = getExpressionValue(getExpression("string(" + baseXPath + "text())")); result.add(variable); } return result; } }
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath = "/run/variables/list/variable[" + i + "]/"; XQueryRunnerVariable variable = new XQueryRunnerVariable(); variable.ACTIVE = Boolean.parseBoolean(getExpressionValue(getExpression(baseXPath + "@active"))); variable.NAME = getExpressionValue(getExpression(baseXPath + "@name")); variable.NAMESPACE = getExpressionValue(getExpression(baseXPath + "@namespace")); variable.TYPE = getExpressionValue(getExpression(baseXPath + "@type")); variable.VALUE = getExpressionValue(getExpression("string(" + baseXPath + "text())")); result.add(variable); } return result; } XQueryRunConfig(String xml); }
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath = "/run/variables/list/variable[" + i + "]/"; XQueryRunnerVariable variable = new XQueryRunnerVariable(); variable.ACTIVE = Boolean.parseBoolean(getExpressionValue(getExpression(baseXPath + "@active"))); variable.NAME = getExpressionValue(getExpression(baseXPath + "@name")); variable.NAMESPACE = getExpressionValue(getExpression(baseXPath + "@namespace")); variable.TYPE = getExpressionValue(getExpression(baseXPath + "@type")); variable.VALUE = getExpressionValue(getExpression("string(" + baseXPath + "text())")); result.add(variable); } return result; } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(); XQueryDataSourceType getDataSourceType(); String getHost(); String getPort(); String getUsername(); String getPassword(); boolean isConfigFileEnabled(); String getConfigFile(); String getDatabaseName(); String getContextItemType(); boolean isDebugEnabled(); String getDebugPort(); }
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath = "/run/variables/list/variable[" + i + "]/"; XQueryRunnerVariable variable = new XQueryRunnerVariable(); variable.ACTIVE = Boolean.parseBoolean(getExpressionValue(getExpression(baseXPath + "@active"))); variable.NAME = getExpressionValue(getExpression(baseXPath + "@name")); variable.NAMESPACE = getExpressionValue(getExpression(baseXPath + "@namespace")); variable.TYPE = getExpressionValue(getExpression(baseXPath + "@type")); variable.VALUE = getExpressionValue(getExpression("string(" + baseXPath + "text())")); result.add(variable); } return result; } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(); XQueryDataSourceType getDataSourceType(); String getHost(); String getPort(); String getUsername(); String getPassword(); boolean isConfigFileEnabled(); String getConfigFile(); String getDatabaseName(); String getContextItemType(); boolean isDebugEnabled(); String getDebugPort();  }