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;
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;
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));
+ }
}