git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7535 51baf565-9d33-0410-a72c-fc3788e3496d
49 lines
860 B
Java
49 lines
860 B
Java
import net.sourceforge.pmd.ant.PmdBuildTask;
|
|
|
|
import org.apache.tools.ant.BuildException;
|
|
import org.junit.After;
|
|
import org.junit.Before;
|
|
import org.junit.BeforeClass;
|
|
import org.junit.Test;
|
|
|
|
/**
|
|
* @author rpelisse
|
|
*
|
|
*/
|
|
public class AntTaskTest {
|
|
|
|
/**
|
|
* @throws java.lang.Exception
|
|
*/
|
|
@BeforeClass
|
|
public static void setUpBeforeClass() throws Exception {
|
|
}
|
|
|
|
/**
|
|
* @throws java.lang.Exception
|
|
*/
|
|
@Before
|
|
public void setUp() throws Exception {
|
|
}
|
|
|
|
/**
|
|
* @throws java.lang.Exception
|
|
*/
|
|
@After
|
|
public void tearDown() throws Exception {
|
|
}
|
|
|
|
@Test
|
|
public void antTask() {
|
|
PmdBuildTask task = new PmdBuildTask();
|
|
task.setRulesDirectory("rulesets");
|
|
task.setTarget("target-test");
|
|
try {
|
|
task.execute();
|
|
} catch (BuildException e) {
|
|
e.printStackTrace();
|
|
}
|
|
|
|
}
|
|
}
|