Package net.sourceforge.pmd.ant
Class AbstractAntTestHelper
- java.lang.Object
-
- net.sourceforge.pmd.ant.AbstractAntTestHelper
-
public abstract class AbstractAntTestHelper extends Object
Base test class for ant tests.Usage template:
{@code class MyPMDTaskTest extends AbstractAntTestHelper { MyPMDTaskTest() { antTestScriptFilename = "mypmdtasktest.xml"; }
- Author:
- Romain Pelisse <belaran@gmail.com>
-
-
Field Summary
Fields Modifier and Type Field Description protected String
antTestScriptFilename
protected String
pathToTestScript
-
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.String
executeTarget(String target)
protected String
getLog()
void
setUp()
-
-
-
Method Detail
-
setUp
@BeforeEach 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.
-
getLog
protected String getLog()
-
assertOutputContaining
public void assertOutputContaining(String text)
-
-