Added more tests for yang parser. Updated current tests.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / java / org / opendaylight / controller / yang / parser / impl / GroupingTest.java
index 2442f51da3d62f90fb521eb2339477d31e4314e3..88d7543520cf79b5b6446c11deaf52fb11b1582b 100644 (file)
@@ -43,7 +43,7 @@ public class GroupingTest {
 
     @Test
     public void testRefine() {
-        Module testModule = TestUtils.findModule(modules, "types2");
+        Module testModule = TestUtils.findModule(modules, "nodes");
 
         ContainerSchemaNode peer = (ContainerSchemaNode) testModule.getDataChildByName("peer");
         ContainerSchemaNode destination = (ContainerSchemaNode) peer.getDataChildByName("destination");
@@ -119,7 +119,7 @@ public class GroupingTest {
 
     @Test
     public void testGrouping() {
-        Module testModule = TestUtils.findModule(modules, "types2");
+        Module testModule = TestUtils.findModule(modules, "custom");
         Set<GroupingDefinition> groupings = testModule.getGroupings();
         assertEquals(1, groupings.size());
         GroupingDefinition grouping = groupings.iterator().next();
@@ -132,13 +132,15 @@ public class GroupingTest {
         // suffix _u = added by uses
         // suffix _g = defined in grouping
 
-        Module testModule = TestUtils.findModule(modules, "types2");
+        Module testModule = TestUtils.findModule(modules, "custom");
 
         // get grouping
         Set<GroupingDefinition> groupings = testModule.getGroupings();
         assertEquals(1, groupings.size());
         GroupingDefinition grouping = groupings.iterator().next();
 
+        testModule = TestUtils.findModule(modules, "nodes");
+
         // get node containing uses
         ContainerSchemaNode peer = (ContainerSchemaNode) testModule.getDataChildByName("peer");
         ContainerSchemaNode destination = (ContainerSchemaNode) peer.getDataChildByName("destination");