Fix IT test instantiation
[yangtools.git] / yang / yang-maven-plugin-it / src / test / java / org / opendaylight / yangtools / yang2sources / plugin / it / YangToSourcesPluginTestIT.java
index 961ab7c0067e01afd2fb39dcc76ae4b8277fe87e..5015100ca26817fe33e1cf6a79a2be7b58d504e6 100644 (file)
@@ -71,28 +71,13 @@ public class YangToSourcesPluginTestIT {
             assertVerificationException(
                     e,
                     "org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException: Imported module " +
-                    "[ModuleIdentifierImpl{name='unknownDep', namespace=null, revision=Wed Feb 27 00:00:00 ");
+                    "[ModuleIdentifierImpl{name='unknownDep', namespace=null, revision=2013-02-27}");
             return;
         }
 
         fail("Verification exception should have been thrown");
     }
 
-    @Test
-    public void testNamingConflict() throws Exception {
-        Verifier v = setUp("test-parent/NamingConflict/", false);
-        v.verifyErrorFreeLog();
-        String baseDir = v.getBasedir();
-        String fileName = v.getLogFileName();
-        List<String> lines = v.loadFile(baseDir, fileName, false);
-        for (String s : lines) {
-            if (s.contains("conflict")) {
-                System.err.println(s);
-            }
-        }
-        v.verifyTextInLog("[WARNING] Naming conflict for type 'org.opendaylight.yang.gen.v1.urn.yang.test.rev140303.NetworkTopologyRef': file with same name already exists and will not be generated.");
-    }
-
     static void verifyCorrectLog(final Verifier v) throws VerificationException {
         v.verifyErrorFreeLog();
         v.verifyTextInLog("[INFO] yang-to-sources: YANG files parsed from");
@@ -165,8 +150,7 @@ public class YangToSourcesPluginTestIT {
 
     @Test
     public void testFindResourceOnCp() throws Exception {
-        Verifier v1 = new Verifier(new File(getClass().getResource(
-                "/test-parent/GenerateTest1/pom.xml").toURI()).getParent());
+        Verifier v1 = setUp("test-parent/GenerateTest1/", false);
         v1.executeGoal("clean");
         v1.executeGoal("package");
 
@@ -180,8 +164,7 @@ public class YangToSourcesPluginTestIT {
         v1.assertFilePresent(buildDir + "/classes/META-INF/yang/testfile2.yang");
         v1.assertFilePresent(buildDir + "/classes/META-INF/yang/testfile3.yang");
 
-        Verifier v2 = new Verifier(new File(getClass().getResource(
-                "/test-parent/GenerateTest2/pom.xml").toURI()).getParent());
+        Verifier v2 = setUp("test-parent/GenerateTest2/", false);
         v2.executeGoal("clean");
         v2.executeGoal("package");