Package net.sourceforge.pmd.cli
Class BaseCLITest
- java.lang.Object
-
- net.sourceforge.pmd.cli.BaseCLITest
-
public abstract class BaseCLITest extends Object
- Author:
- Romain Pelisse <[email protected]>
-
-
Field Summary
Fields Modifier and Type Field Description protected PrintStreamoriginalErrprotected PrintStreamoriginalOutprotected static StringSOURCE_FOLDERprotected static StringTEST_OUPUT_DIRECTORY
-
Constructor Summary
Constructors Constructor Description BaseCLITest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckStatusCode(int expectedExitCode)protected voidcreateTestOutputFile(String filename)protected intgetStatusCode()protected voidrunPMDWith(String[] args)protected StringrunTest(String[] args, String testname)protected StringrunTest(String[] args, String testname, int expectedExitCode)voidsetup()static voidsetUp()voidtearDown()
-
-
-
Field Detail
-
TEST_OUPUT_DIRECTORY
protected static final String TEST_OUPUT_DIRECTORY
- See Also:
- Constant Field Values
-
SOURCE_FOLDER
protected static final String SOURCE_FOLDER
- See Also:
- Constant Field Values
-
originalOut
protected PrintStream originalOut
-
originalErr
protected PrintStream originalErr
-
-
Method Detail
-
setup
public void setup()
-
tearDown
public void tearDown()
-
createTestOutputFile
protected void createTestOutputFile(String filename)
-
runPMDWith
protected void runPMDWith(String[] args)
-
checkStatusCode
protected void checkStatusCode(int expectedExitCode)
-
getStatusCode
protected int getStatusCode()
-
-