Added test to yang-maven-plugin-it.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / maven-yang-plugin-it / src / test / java / org / opendaylight / controller / yang2sources / plugin / it / YangToSourcesPluginTest.java
index 75d6ee5d7d5ffb1898cb950d37af25203d2e0e04..267e35ab605fc469a3785655956c0edcdf35407a 100644 (file)
@@ -116,4 +116,17 @@ public class YangToSourcesPluginTest {
         verifyCorrectLog(v);
     }
 
+    @Test
+    public void testFindResourceOnCp() throws VerificationException {
+        Verifier v1 = new Verifier(new File("src/test/resources/GenerateTest1/").getAbsolutePath());
+        v1.executeGoal("package");
+        v1.assertFilePresent("target/external-resources/testfile1.yang");
+        v1.assertFilePresent("target/external-resources/testfile2.yang");
+        v1.assertFilePresent("target/external-resources/testfile3.yang");
+
+        Verifier v2 = YangToSourcesPluginTest.setUp("GenerateTest2/",
+                false);
+        v2.executeGoal("package");
+    }
+
 }