Fix leafref-to-enum encoding
[mdsal.git] / binding / mdsal-binding-generator-impl / src / test / java / org / opendaylight / mdsal / binding / generator / impl / UnionTypeDefTest.java
index a12c1bdafda9f3f991e90b3236d11187f973c99f..9030c20eea045bd809506b25e8411e8e2f071f87 100644 (file)
@@ -29,7 +29,7 @@ public class UnionTypeDefTest {
             "/union-test-models/abstract-topology.yang", "/ietf/ietf-inet-types.yang");
 
         assertNotNull("context is null", context);
-        final BindingGenerator bindingGen = new BindingGeneratorImpl(true);
+        final BindingGenerator bindingGen = new BindingGeneratorImpl();
         final List<Type> genTypes = bindingGen.generateTypes(context);
 
         assertNotNull("genTypes is null", genTypes);
@@ -43,7 +43,7 @@ public class UnionTypeDefTest {
         final SchemaContext schemaContext = YangParserTestUtils.parseYangResource(
             "/leafref_typedef_union/bug8449.yang");
         assertNotNull(schemaContext);
-        final List<Type> generateTypes = new BindingGeneratorImpl(false).generateTypes(schemaContext);
+        final List<Type> generateTypes = new BindingGeneratorImpl().generateTypes(schemaContext);
         assertNotNull(generateTypes);
         for (final Type type : generateTypes) {
             if (type.getName().equals("Cont")) {
@@ -55,9 +55,8 @@ public class UnionTypeDefTest {
                         case "stringRefValue":
                             assertEquals(Types.STRING, generatedProperty.getReturnType());
                             break;
-                        case "value":
-                            assertEquals(Types.CHAR_ARRAY, generatedProperty.getReturnType());
-                            break;
+                        default:
+                            // ignore
                     }
                 }
             }