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 StringantTestScriptFilenameorg.apache.tools.ant.BuildFileRulebuildRuleDeprecated.StringmvnWorkaroundDeprecated.protected StringpathToTestScriptorg.junit.contrib.java.lang.system.SystemErrRulesystemErrRuleDeprecated.org.junit.rules.TemporaryFoldertempFolderDeprecated.
-
Constructor Summary
Constructors Constructor Description AbstractAntTestHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertContains(String text, String toFind)voidassertDoesntContain(String text, String toFind)voidassertOutputContaining(String text)FilecurrentTempFile()Returns the current temporary file.voidexecuteTarget(String target)voidsetUp()
-
-
-
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)
-
-