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 <belaran@gmail.com>
-
-
Field Summary
Fields Modifier and Type Field Description protected String
antTestScriptFilename
org.apache.tools.ant.BuildFileRule
buildRule
Deprecated.String
mvnWorkaround
Deprecated.protected String
pathToTestScript
org.junit.contrib.java.lang.system.SystemErrRule
systemErrRule
Deprecated.org.junit.rules.TemporaryFolder
tempFolder
Deprecated.
-
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
@InternalApi @Deprecated public final org.junit.rules.TemporaryFolder tempFolder
Deprecated.
-
buildRule
@InternalApi @Deprecated public final org.apache.tools.ant.BuildFileRule buildRule
Deprecated.
-
systemErrRule
@InternalApi @Deprecated public final org.junit.contrib.java.lang.system.SystemErrRule systemErrRule
Deprecated.
-
pathToTestScript
protected String pathToTestScript
-
antTestScriptFilename
protected String antTestScriptFilename
-
mvnWorkaround
@InternalApi @Deprecated public String mvnWorkaround
Deprecated.
-
-
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)
-
-