Bug 3670 (part 2/5): Use of new statement parser in yang-maven-plugin
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / impl / TwoRevisionsTest.java
index 05a669db7edbefe1142ace2319fc332ba808889e..5e29a76719b045fdbf60f6620dbb5610b1b9b2ad 100644 (file)
@@ -1,28 +1,24 @@
+/*
+ * Copyright (c) 2014 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.parser.impl;
 
-import org.junit.Test;
-import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.parser.api.YangModelParser;
+import static org.junit.Assert.assertEquals;
 
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Set;
-
-import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+import org.opendaylight.yangtools.yang.model.api.Module;
 
 public class TwoRevisionsTest {
 
     @Test
     public void testTwoRevisions() throws Exception {
-        YangModelParser parser = new YangParserImpl();
-
-        Set<Module> modules = TestUtils.loadModules(getClass().getResource("/ietf").getPath(), parser);
+        Set<Module> modules = TestUtils.loadModules(getClass().getResource("/ietf").toURI());
         assertEquals(2, TestUtils.findModules(modules, "network-topology").size());
-
-        SchemaContext schemaContext = parser.resolveSchemaContext(modules);
-        assertEquals(2, TestUtils.findModules(schemaContext.getModules(), "network-topology").size());
-
     }
 
 }