+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
package org.opendaylight.yangtools.yang.stmt.retest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.URISyntaxException;
import org.opendaylight.yangtools.yang.model.api.ModuleImport;
import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
import org.opendaylight.yangtools.yang.parser.spi.meta.SomeModifiersUnresolvedException;
+import org.opendaylight.yangtools.yang.parser.util.NamedFileInputStream;
import org.opendaylight.yangtools.yang.stmt.test.StmtTestUtils;
public class YangParserIdentityTest {
public void testParsingIdentityTestModule() throws URISyntaxException,
ReactorException, FileNotFoundException {
File yang = new File(getClass().getResource("/identity/identitytest.yang").toURI());
- InputStream stream = new FileInputStream(yang);
+ InputStream stream = new NamedFileInputStream(yang, yang.getPath());
try {
TestUtils.loadModule(stream);
} catch (SomeModifiersUnresolvedException e) {
public void testParsingPrefixIdentityTestModule() throws URISyntaxException,
ReactorException, FileNotFoundException {
File yang = new File(getClass().getResource("/identity/prefixidentitytest.yang").toURI());
- InputStream stream = new FileInputStream(yang);
+ InputStream stream = new NamedFileInputStream(yang, yang.getPath());
try {
TestUtils.loadModule(stream);
} catch (SomeModifiersUnresolvedException e) {