import java.net.URISyntaxException;
import java.net.URL;
import java.util.Arrays;
-import java.util.List;
import java.util.Properties;
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
public class YangToSourcesPluginTestIT {
} catch (VerificationException e) {
assertVerificationException(
e,
- "org.opendaylight.yangtools.yang.parser.util.YangValidationException: Not existing module imported:unknownDep:2013-02-27 by:private:2013-02-27");
+ "org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException: Imported module " +
+ "[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");
}
@Test
- @Ignore
public void testInvalidVersion() throws Exception {
Verifier v = setUp("test-parent/InvalidVersion/", false);
v.verifyErrorFreeLog();