Search in sources :

Example 1 with MavenModule

use of org.jenkinsci.test.acceptance.plugins.maven.MavenModule in project acceptance-test-harness by jenkinsci.

the class ViolationsPluginTest method maven.

@Test
public void maven() {
    MavenInstallation.installSomeMaven(jenkins);
    MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
    job.configure();
    job.copyDir(resource("/violations_plugin"));
    new Violations(job).config("fxcop").pattern("fxcop/*");
    job.save();
    job.startBuild().shouldSucceed();
    MavenModule module = job.module("gid$example");
    MavenModuleBuild moduleBuild = module.getLastBuild();
    assertThat(module.action(ViolationsAction.class), hasViolations("fxcop", "2", "2"));
    assertThat(moduleBuild.action(ViolationsAction.class), hasViolations("fxcop", "2", "2"));
}
Also used : Violations(org.jenkinsci.test.acceptance.plugins.violations.Violations) MavenModuleBuild(org.jenkinsci.test.acceptance.plugins.maven.MavenModuleBuild) MavenModule(org.jenkinsci.test.acceptance.plugins.maven.MavenModule) ViolationsAction(org.jenkinsci.test.acceptance.plugins.violations.ViolationsAction) MavenModuleSet(org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Aggregations

AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 MavenModule (org.jenkinsci.test.acceptance.plugins.maven.MavenModule)1 MavenModuleBuild (org.jenkinsci.test.acceptance.plugins.maven.MavenModuleBuild)1 MavenModuleSet (org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet)1 Violations (org.jenkinsci.test.acceptance.plugins.violations.Violations)1 ViolationsAction (org.jenkinsci.test.acceptance.plugins.violations.ViolationsAction)1 Test (org.junit.Test)1