Fix broken tests according to yangtools changes
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / test / java / org / opendaylight / mdsal / binding / javav2 / generator / impl / YangTemplateTest.java
index 2484b4a80bdade6b4fba7f832cee747841c17d9b..f6523140fbd425348c4ecf97367c96203d0713e8 100644 (file)
@@ -11,8 +11,10 @@ package org.opendaylight.mdsal.binding.javav2.generator.impl;
 import static org.junit.Assert.assertTrue;
 
 import com.google.common.annotations.Beta;
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.net.URISyntaxException;
+import java.net.URL;
 import java.util.Iterator;
 import java.util.Set;
 import org.junit.Assert;
@@ -31,7 +33,8 @@ public class YangTemplateTest {
 
     @Before
     public void setup() throws URISyntaxException, ReactorException, FileNotFoundException {
-        this.modules = YangParserTestUtils.parseYangSources("/yang-template").getModules();
+        File[] listFiles = new File(getClass().getResource("/yang-template").toURI()).listFiles();
+        this.modules = YangParserTestUtils.parseYangFiles(listFiles).getModules();
     }
 
     @Test