use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method encoding.
@Test
public void encoding() throws Exception {
Verifier verifier = MavenVerifierUtil.newVerifier(ROOT + "/encoding");
String xtendDir = verifier.getBasedir() + "/src/main/java";
assertFileContainsUTF16(verifier, xtendDir + "/test/XtendA.xtend", "M�hlheim-K�rlicher B�rger");
verifier.setDebug(true);
verifier.executeGoal("test");
verifier.verifyErrorFreeLog();
String gen = verifier.getBasedir() + "/src/main/generated-sources/xtend/test/XtendA.java";
assertFileContainsUTF16(verifier, gen, "M�hlheim-K�rlicher B�rger");
assertFileContainsUTF16(verifier, gen, "_builder.append(\"m�chte meine \");");
assertFileContainsUTF16(verifier, gen, "_builder.append(\"t�r �len\");");
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method suppressWarningsAnnotation.
@Test
public void suppressWarningsAnnotation() throws Exception {
Verifier verifier = MavenVerifierUtil.newVerifier(ROOT + "/suppress_warnings_annotation");
System.out.println(verifier.getLogFileName());
verifier.setDebug(true);
verifier.executeGoal("test");
verifier.verifyErrorFreeLog();
String outputdir = verifier.getBasedir() + "/";
assertFileDoesNotContain(verifier, outputdir + "src/main/generated-sources/xtend/test/XtendA.java", "@SuppressWarnings");
assertFileDoesNotContain(verifier, outputdir + "src/test/generated-sources/xtend/test/XtendB.java", "@SuppressWarnings");
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method continueOnXtendWarnings.
@Test
public void continueOnXtendWarnings() throws Exception {
Verifier verifier = MavenVerifierUtil.newVerifier(ROOT + "/xtendwarnings");
verifier.executeGoal("verify");
verifier.verifyTextInLog("3: The import 'java.util.Collections' is never used.");
verifier.verifyTextInLog("[INFO] BUILD SUCCESS");
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method readXtendPrefs.
@Test
public void readXtendPrefs() throws Exception {
Verifier verifier = MavenVerifierUtil.newVerifier(ROOT + "/xtend-prefs");
verifier.setDebug(true);
verifier.executeGoal("test");
verifier.verifyErrorFreeLog();
String xtendOutputDirFromPrefs = "generated-sources/xtend-from-pref";
String xtendGenDir = verifier.getBasedir() + "/src/main/" + xtendOutputDirFromPrefs;
verifier.assertFilePresent(xtendGenDir + "/test/XtendA.java");
verifier.assertFilePresent(xtendGenDir + "/test/XtendC.java");
String xtendTestGenDir = verifier.getBasedir() + "/src/test/" + xtendOutputDirFromPrefs;
verifier.assertFilePresent(xtendTestGenDir + "/tests/XtendA.java");
verifier.assertFilePresent(xtendTestGenDir + "/tests/XtendC.java");
}
use of org.apache.maven.it.Verifier in project xtext-xtend by eclipse.
the class XtendCompilerMojoIT method verifyErrorFreeLog.
private void verifyErrorFreeLog(String pathToTestProject, String goal) throws IOException, VerificationException {
Verifier verifier = MavenVerifierUtil.newVerifier(pathToTestProject);
verifier.executeGoal(goal);
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
Aggregations