Package net.sourceforge.pmd.ant
Class AbstractAntTestHelper
- java.lang.Object
-
- net.sourceforge.pmd.ant.AbstractAntTestHelper
-
public abstract class AbstractAntTestHelper extends Object
Quite an ugly classe, arguably useful for just 2 units test - nevertheless as there is a workaround that must be shared by both tests (PMD and CPD's) I felt compelled to move it to a single classes.- Author:
- Romain Pelisse <[email protected]>
-
-
Field Summary
Fields Modifier and Type Field Description protected String
antTestScriptFilename
org.apache.tools.ant.BuildFileRule
buildRule
String
mvnWorkaround
protected String
pathToTestScript
org.junit.rules.TemporaryFolder
tempFolder
-
Constructor Summary
Constructors Constructor Description AbstractAntTestHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertContains(String text, String toFind)
void
assertDoesntContain(String text, String toFind)
void
assertOutputContaining(String text)
File
currentTempFile()
Returns the current temporary file.void
executeTarget(String target)
void
setUp()
-
-
-
Field Detail
-
tempFolder
public final org.junit.rules.TemporaryFolder tempFolder
-
buildRule
public final org.apache.tools.ant.BuildFileRule buildRule
-
pathToTestScript
protected String pathToTestScript
-
antTestScriptFilename
protected String antTestScriptFilename
-
mvnWorkaround
public String mvnWorkaround
-
-
Method Detail
-
setUp
public void setUp() throws IOException
- Throws:
IOException
-
currentTempFile
public File currentTempFile()
Returns the current temporary file. Replaced by a fresh (inexistent) file before each test.
-
executeTarget
public void executeTarget(String target)
-
assertOutputContaining
public void assertOutputContaining(String text)
-
-