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 <[email protected]>
-
-
Field Summary
Fields Modifier and Type Field Description protected StringantTestScriptFilenameprotected StringpathToTestScript
-
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.StringexecuteTarget(String target)protected StringgetLog()voidsetUp()
-
-
-
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)
-
-