Address FIXME for QueuedNotificationManager
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / impl / TypesResolutionTest.java
index 6156093cf89684131339d108868a6c08c924dd7d..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;
@@ -343,7 +345,13 @@ public class TypesResolutionTest {
     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(Arrays.asList(unionbits));
+        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));
+    }
 }