use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method haltOnXtendValidationErrors.
@Test
public void haltOnXtendValidationErrors() throws Exception {
Verifier verifier = MavenVerifierUtil.newVerifier(ROOT + "/xtenderrors");
try {
verifier.executeGoal("verify");
Assert.fail("expected org.apache.maven.plugin.MojoExecutionException");
} catch (Exception e) {
verifier.verifyTextInLog("3: Superclass must be a class");
verifier.verifyTextInLog("BUILD FAILURE");
}
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method setUpOnce.
@BeforeClass
public static void setUpOnce() throws IOException, VerificationException {
MavenVerifierUtil.checkMavenExecutable(ROOT);
Verifier clientVerifier = MavenVerifierUtil.newVerifier("/it");
clientVerifier.executeGoal("install");
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method fileSystemAccess.
@Test
public void fileSystemAccess() throws Exception {
deleteFileIfExist("myusercode/UserCode.css");
deleteFileIfExist("com/itemis/myusercode/UserCode2.css");
Verifier annotationVerifier = MavenVerifierUtil.newVerifier(ROOT + "/filesystemaccess");
annotationVerifier.setDebug(true);
annotationVerifier.executeGoal("install");
annotationVerifier.verifyErrorFreeLog();
Verifier clientVerifier = MavenVerifierUtil.newVerifier(ROOT + "/filesystemaccess-client");
clientVerifier.setDebug(true);
clientVerifier.executeGoal("compile");
clientVerifier.verifyErrorFreeLog();
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method readSymlinks.
@Test
public void readSymlinks() throws Exception {
String root = ResourceExtractor.simpleExtractResources(getClass(), ROOT).getAbsolutePath();
File link = new File(root + "/symlinks/src/main/java");
File link2 = new File(root + "/symlinks/src/test/java");
createSymLink(root + "/multisources/src/main/java/", link.getAbsolutePath());
createSymLink(root + "/multisources/src/test/java/", link2.getAbsolutePath());
try {
Verifier verifier = MavenVerifierUtil.newVerifier(ROOT + "/symlinks");
verifier.setDebug(true);
verifier.executeGoal("test");
verifier.verifyErrorFreeLog();
String outputdir = verifier.getBasedir();
verifier.assertFilePresent(outputdir + "/src/main/generated-sources/xtend/test/XtendA.java");
verifier.assertFilePresent(outputdir + "/src/main/generated-sources/xtend/test/XtendC.java");
verifier.assertFilePresent(outputdir + "/src/main/generated-sources/xtend/test/.XtendA.java._trace");
verifier.assertFilePresent(outputdir + "/src/main/generated-sources/xtend/test/.XtendC.java._trace");
verifier.assertFilePresent(outputdir + "/src/test/generated-sources/xtend/foo/FooClass.java");
verifier.assertFilePresent(outputdir + "/src/test/generated-sources/xtend/foo/FooTest.java");
verifier.assertFilePresent(outputdir + "/src/test/generated-sources/xtend/foo/.FooClass.java._trace");
verifier.assertFilePresent(outputdir + "/src/test/generated-sources/xtend/foo/.FooTest.java._trace");
} finally {
link.delete();
link2.delete();
}
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method readXtendPrefsUnused.
@Test
public void readXtendPrefsUnused() throws Exception {
Verifier verifier = MavenVerifierUtil.newVerifier(ROOT + "/xtend-prefs-unused");
verifier.setDebug(true);
verifier.executeGoal("test");
verifier.verifyErrorFreeLog();
String pomsOutputDir = "xtend-dir-from-pom";
String xtendGenDir = verifier.getBasedir() + "/src/main/" + pomsOutputDir;
verifier.assertFilePresent(xtendGenDir + "/test/XtendA.java");
verifier.assertFilePresent(xtendGenDir + "/test/XtendC.java");
String xtendTestGenDir = verifier.getBasedir() + "/src/test/" + pomsOutputDir;
verifier.assertFilePresent(xtendTestGenDir + "/tests/XtendA.java");
verifier.assertFilePresent(xtendTestGenDir + "/tests/XtendC.java");
}
Aggregations