Address FIXME for QueuedNotificationManager
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / impl / TypesResolutionTest.java
index a2fa589a564e9a130135edf0c6e9d1e2caf2abfb..d88f88b19b32f8fb8e5a2724905c6af398b29a63 100644 (file)
@@ -17,6 +17,7 @@ import java.io.File;
 import java.math.BigInteger;
 import java.net.URI;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 import org.junit.Before;
@@ -39,6 +40,7 @@ import org.opendaylight.yangtools.yang.model.util.ExtendedType;
 import org.opendaylight.yangtools.yang.model.util.IdentityrefType;
 import org.opendaylight.yangtools.yang.model.util.InstanceIdentifierType;
 import org.opendaylight.yangtools.yang.model.util.UnionType;
+import org.opendaylight.yangtools.yang.parser.util.YangParseException;
 
 public class TypesResolutionTest {
     private Set<Module> testedModules;
@@ -339,4 +341,17 @@ public class TypesResolutionTest {
         parser.parseFiles(Arrays.asList(extdef, unionbug, inet));
     }
 
+    @Test
+    public void testUnionWithBits() throws Exception {
+        File unionbits = new File(getClass().getResource("/types/union-with-bits/union-bits-model.yang").toURI());
+        YangContextParser parser = new YangParserImpl();
+        parser.parseFiles(Collections.singletonList(unionbits));
+    }
+
+    @Test(expected = YangParseException.class)
+    public void testUnionInList() throws Exception {
+       File unioninlist = new File(getClass().getResource("/types/union-in-list/unioninlisttest.yang").toURI());
+       YangContextParser parser = new YangParserImpl();
+       parser.parseFiles(Collections.singletonList(unioninlist));
+    }
 }