1 package org.opendaylight.controller.sal.restconf.impl.xml.to.cnsn.test;
3 import static org.junit.Assert.assertNotNull;
8 import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
9 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
10 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
11 import org.opendaylight.yangtools.yang.model.api.Module;
13 public class XmlAugmentedElementToCnSnTest {
16 public void loadDataAugmentedSchemaMoreEqualNamesTest() {
17 loadAndNormalizeData("/common/augment/xml/dataa.xml", "/common/augment/yang", "main","cont");
18 loadAndNormalizeData("/common/augment/xml/datab.xml", "/common/augment/yang", "main","cont");
21 private void loadAndNormalizeData(String xmlPath, String yangPath, String topLevelElementName, String moduleName) {
22 CompositeNode compNode = TestUtils.readInputToCnSn(xmlPath, false,
23 XmlToCompositeNodeProvider.INSTANCE);
24 assertNotNull(compNode);
25 Set<Module> modules = TestUtils.loadModulesFrom(yangPath);
27 assertNotNull(modules);
28 TestUtils.normalizeCompositeNode(compNode, modules, topLevelElementName + ":" + moduleName);