Remove deprecated Yin/YangStatementSourceImpl
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / yin / YinFileHeaderStmtsTest.java
index d8231d403ee144ecdc49c34c72740133056dba40..47852d18ca4aafa4c3a6af56d3908f4b227078ae 100644 (file)
@@ -9,29 +9,31 @@ package org.opendaylight.yangtools.yang.stmt.yin;
 
 import static org.junit.Assert.assertEquals;
 
+import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.Set;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.YangVersion;
 import org.opendaylight.yangtools.yang.model.api.Module;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.stmt.TestUtils;
+import org.xml.sax.SAXException;
 
 public class YinFileHeaderStmtsTest {
 
-    private Set<Module> modules;
+    private SchemaContext modules;
 
     @Before
-    public void init() throws URISyntaxException, ReactorException {
+    public void init() throws URISyntaxException, ReactorException, SAXException, IOException {
         modules = TestUtils.loadYinModules(getClass().getResource("/semantic-statement-parser/yin/modules").toURI());
-        assertEquals(9, modules.size());
+        assertEquals(9, modules.getModules().size());
     }
 
     @Test
     public void testYinFileHeader() throws URISyntaxException {
-        Module testModule = TestUtils.findModule(modules, "config");
+        Module testModule = TestUtils.findModule(modules, "config").get();
 
         assertEquals(YangVersion.VERSION_1.toString(), testModule.getYangVersion());
         assertEquals(new URI("urn:opendaylight:params:xml:ns:yang:controller:config"), testModule.getNamespace());