Prevent ConfigPusher from killing its thread
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / xml / to / cnsn / test / XmlAugmentedElementToCnSnTest.java
1 package org.opendaylight.controller.sal.restconf.impl.xml.to.cnsn.test;
2
3 import static org.junit.Assert.assertNotNull;
4
5 import java.util.Set;
6
7 import org.junit.Test;
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;
12
13 public class XmlAugmentedElementToCnSnTest {
14
15     @Test
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");
19     }
20     
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);
26
27         assertNotNull(modules);
28         TestUtils.normalizeCompositeNode(compNode, modules, topLevelElementName + ":" + moduleName);
29     }
30
31
32 }