- for (XmlElement moduleElement : modulesElement.getChildElements("module")) {
- for (XmlElement type : moduleElement.getChildElements("type")) {
- if (type.getNamespaceOptionally().isPresent()) {
- configAttributeType.add(type.getTextContent());
- }
- }
- }
-
- for (String expectedValue : expectedValues) {
- assertTrue(configAttributeType.contains(expectedValue));
+ Map<String,String> namesToTypeValues = ImmutableMap.of("instance-from-code", "configAttributeType",
+ "test2", "default-string");
+ for (Entry<String, String> nameToExpectedValue : namesToTypeValues.entrySet()) {
+ XMLAssert.assertXpathEvaluatesTo(nameToExpectedValue.getValue(),
+ getXpathForNetconfImplSubnode(nameToExpectedValue.getKey(),"type"),
+ response);