Merge "Immutable implementation of new yang-data-api"
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / impl / GroupingTest.java
index 2adb544f5a49884b9b2b1b31ad409396ebf7cf7c..0e75a2a144c50d17f0b97702f9b5efafca81286d 100644 (file)
@@ -7,12 +7,16 @@
  */
 package org.opendaylight.yangtools.yang.parser.impl;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.net.URI;
-import java.text.ParseException;
+import java.net.URISyntaxException;
 import java.text.SimpleDateFormat;
 import java.util.Collections;
 import java.util.Date;
@@ -43,8 +47,8 @@ public class GroupingTest {
     private Set<Module> modules;
 
     @Before
-    public void init() throws FileNotFoundException {
-        modules = TestUtils.loadModules(getClass().getResource("/model").getPath());
+    public void init() throws FileNotFoundException, URISyntaxException {
+        modules = TestUtils.loadModules(getClass().getResource("/model").toURI());
         assertEquals(3, modules.size());
     }
 
@@ -345,8 +349,8 @@ public class GroupingTest {
     }
 
     @Test
-    public void testCascadeUses() throws FileNotFoundException, ParseException {
-        File yangFile = new File(getClass().getResource("/grouping-test/cascade-uses.yang").getPath());
+    public void testCascadeUses() throws Exception {
+        File yangFile = new File(getClass().getResource("/grouping-test/cascade-uses.yang").toURI());
         YangModelParser parser = new YangParserImpl();
         modules = parser.parseYangModels(Collections.singletonList(yangFile));
         assertEquals(1, modules.size());