Migrate getDataChildByName() users
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / DeviationResolutionTest.java
index c3292d8f0fd74adac369f577dccbbaa99027139e..06a19918d3b42c956fc4dac320608c6bdd130c2b 100644 (file)
@@ -61,7 +61,7 @@ public class DeviationResolutionTest {
         assertEquals(1, myContA.getChildNodes().size());
         assertNotNull(myContA.getDataChildByName(QName.create(importedModule.getQNameModule(), "my-leaf-a3")));
 
-        final ContainerSchemaNode myContB = (ContainerSchemaNode) importedModule.getDataChildByName(
+        final ContainerSchemaNode myContB = (ContainerSchemaNode) importedModule.dataChildByName(
                 QName.create(importedModule.getQNameModule(), "my-cont-b"));
         assertNull(myContB);
 
@@ -86,12 +86,12 @@ public class DeviationResolutionTest {
                 QName.create(barModule.getQNameModule(), "my-leaf-list"));
         assertNotNull(myLeafList);
 
-        assertFalse(myLeafList.isConfiguration());
+        assertEquals(Optional.of(Boolean.FALSE), myLeafList.effectiveConfig());
         assertEquals(3, myLeafList.getDefaults().size());
 
         final ElementCountConstraint constraint = myLeafList.getElementCountConstraint().get();
-        assertEquals(10, constraint.getMaxElements().intValue());
-        assertEquals(5, constraint.getMinElements().intValue());
+        assertEquals((Object) 10, constraint.getMaxElements());
+        assertEquals((Object) 5, constraint.getMinElements());
         assertNotNull(myLeafList.getType().getUnits());
 
         final ListSchemaNode myList = (ListSchemaNode) barModule.getDataChildByName(
@@ -149,9 +149,9 @@ public class DeviationResolutionTest {
         assertNotNull(myLeafList);
 
         final ElementCountConstraint constraint = myLeafList.getElementCountConstraint().get();
-        assertEquals(6, constraint.getMaxElements().intValue());
-        assertEquals(3, constraint.getMinElements().intValue());
-        assertTrue(myLeafList.isConfiguration());
+        assertEquals((Object) 6, constraint.getMaxElements());
+        assertEquals((Object) 3, constraint.getMinElements());
+        assertEquals(Optional.of(Boolean.TRUE), myLeafList.effectiveConfig());
 
         final ChoiceSchemaNode myChoice = (ChoiceSchemaNode) barModule.getDataChildByName(
                 QName.create(barModule.getQNameModule(), "my-choice"));