Fixed incorrect path construction in JUnit tests.
[yangtools.git] / code-generator / maven-sal-api-gen-plugin / src / test / java / org / opendaylight / yangtools / yang / wadl / generator / maven / WadlGenTest.java
index fbcdf2c884ba56f93231ff584f2d840574bebd63..174baf72c08766ab89d6c09a115e075a99a05204 100644 (file)
@@ -1,9 +1,17 @@
+/*
+ * 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.wadl.generator.maven;
 
 import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -50,8 +58,8 @@ public class WadlGenTest {
         assertEquals(3, generatedWadlFiles.size());
     }
 
-    private static List<File> getSourceFiles(String path) throws FileNotFoundException {
-        final String resPath = WadlGenTest.class.getResource(path).getPath();
+    private static List<File> getSourceFiles(String path) throws Exception {
+        final URI resPath = WadlGenTest.class.getResource(path).toURI();
         final File sourcesDir = new File(resPath);
         if (sourcesDir.exists()) {
             final List<File> sourceFiles = new ArrayList<>();