@Override public void read(ConfigurationNode node, ConfigurationReader reader) throws ConfigurationException { title = reader.readStringAttribute(node, ConfigurationXml.ATTRIBUTE_TITLE); scenarios.addAll(readScenarios(node, reader)); for (Scenario scenario : scenarios) { scenario.setGroup(title); } }
/** * Read the scenarios of a node representing the scenario group. * * @param scenarioGroup * @return a list of scenarios configured within this scenario group that must not be <code>null * </code> * @throws ConfigurationException if a problem occur to read the XML nodes * @author martin.wurzinger */ private static List<Scenario> readScenarios( ConfigurationNode scenarioGroup, ConfigurationReader reader) throws ConfigurationException { List<Scenario> results = new ArrayList<Scenario>(); for (ConfigurationNode scenarioNode : reader.getChildren(scenarioGroup, DefaultScenarioGroup.NODE_SCENARIO)) { Scenario scenario = new DefaultScenario(); scenario.read(scenarioNode, reader); results.add(scenario); } return results; }