DTOs for anydata/anyxml are not generated within a list
[mdsal.git] / binding / mdsal-binding-generator-impl / src / test / java / org / opendaylight / mdsal / binding / generator / impl / GenEnumResolvingTest.java
index 12906d2c2665f8bf3dc41c16918378e41a19cb42..407a4cdb395071f02a540195772bbd9f982936e6 100644 (file)
@@ -71,7 +71,7 @@ public class GenEnumResolvingTest {
 
         assertNotNull("Generated Interface cannot contain NULL reference for Method Signature Definitions!", methods);
 
-        assertEquals("Expected count of method signature definitions is 15", 15, methods.size());
+        assertEquals("Expected count of method signature definitions is 16", 16, methods.size());
         Enumeration ianaIfType = null;
         for (final MethodSignature method : methods) {
             if (method.getName().equals("getType")) {
@@ -128,7 +128,7 @@ public class GenEnumResolvingTest {
         Type operStatus = null;
         final List<MethodSignature> methods = genInterface.getMethodDefinitions();
         assertNotNull("Generated Type Interface cannot contain NULL reference to Enumeration types!", methods);
-        assertEquals("Generated Type Interface MUST contain 5 Methods ", 5, methods.size());
+        assertEquals("Generated Type Interface MUST contain 6 Methods ", 6, methods.size());
         for (final MethodSignature method : methods) {
             if (method.getName().equals("getLinkUpDownTrapEnable")) {
                 linkUpDownTrapEnable = method.getReturnType();
@@ -139,13 +139,15 @@ public class GenEnumResolvingTest {
 
         assertNotNull("Expected Referenced Enum LinkUpDownTrapEnable, but was NULL!", linkUpDownTrapEnable);
         assertTrue("Expected LinkUpDownTrapEnable of type Enumeration", linkUpDownTrapEnable instanceof Enumeration);
-        assertEquals(linkUpDownTrapEnable.getPackageName(),
-                "org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev121115.interfaces.Interface");
+        assertEquals(
+            "org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev121115.interfaces.Interface",
+            linkUpDownTrapEnable.getIdentifier().immediatelyEnclosingClass().get().toString());
 
         assertNotNull("Expected Referenced Enum OperStatus, but was NULL!", operStatus);
         assertTrue("Expected OperStatus of type Enumeration", operStatus instanceof Enumeration);
-        assertEquals(operStatus.getPackageName(),
-                "org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev121115.interfaces.Interface");
+        assertEquals(
+            "org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev121115.interfaces.Interface",
+            operStatus.getIdentifier().immediatelyEnclosingClass().get().toString());
     }
 
 }