Package net.sourceforge.pmd.cli
Class BaseCLITest
- java.lang.Object
-
- net.sourceforge.pmd.cli.BaseCLITest
-
public abstract class BaseCLITest extends Object
- Author:
- Romain Pelisse <belaran@gmail.com>
-
-
Field Summary
Fields Modifier and Type Field Description protected PrintStream
originalErr
protected PrintStream
originalOut
protected static String
SOURCE_FOLDER
protected static String
TEST_OUPUT_DIRECTORY
-
Constructor Summary
Constructors Constructor Description BaseCLITest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
checkStatusCode(int expectedExitCode)
Deprecated.UserunTest(StatusCode, String...)
instead of checking the return code manuallystatic org.hamcrest.Matcher<String>
containsPattern(String regex)
protected void
createTestOutputFile(String filename)
protected int
getStatusCode()
Deprecated.UserunTest(StatusCode, String...)
instead of checking the return code manuallyprotected void
runPMDWith(String[] args)
Deprecated.protected String
runTest(int expectedExitCode, String... args)
Deprecated.protected String
runTest(String... args)
Returns the log output.protected String
runTest(String[] args, String testname)
Deprecated.UserunTest(String...)
, note that it returns the log while this returns the name of a file containing the log.protected String
runTest(String[] args, String testname, int expectedExitCode)
Deprecated.UserunTest(StatusCode, String...)
, note that it returns the log while this returns the name of a file containing the log.protected String
runTest(PMD.StatusCode expectedExitCode, String... args)
void
setup()
static void
setUp()
void
tearDown()
-
-
-
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)
-
runTest
@Deprecated protected String runTest(String[] args, String testname)
Deprecated.UserunTest(String...)
, note that it returns the log while this returns the name of a file containing the log.
-
runTest
@Deprecated protected String runTest(String[] args, String testname, int expectedExitCode)
Deprecated.UserunTest(StatusCode, String...)
, note that it returns the log while this returns the name of a file containing the log.
-
runTest
@Deprecated protected String runTest(int expectedExitCode, String... args)
Deprecated.Returns the log output.
-
runTest
protected String runTest(PMD.StatusCode expectedExitCode, String... args)
-
runPMDWith
@Deprecated protected void runPMDWith(String[] args)
Deprecated.
-
checkStatusCode
@Deprecated protected void checkStatusCode(int expectedExitCode)
Deprecated.UserunTest(StatusCode, String...)
instead of checking the return code manually
-
getStatusCode
@Deprecated protected int getStatusCode()
Deprecated.UserunTest(StatusCode, String...)
instead of checking the return code manually
-
-