|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.jexl2.JexlTestCase
public class JexlTestCase
Implements runTest methods to dynamically instantiate and invoke a test, wrapping the call with setUp(), tearDown() calls. Eases the implementation of main methods to debug.
| Field Summary | |
|---|---|
protected JexlEngine |
JEXL
A default Jexl engine instance. |
| Constructor Summary | |
|---|---|
|
JexlTestCase()
|
protected |
JexlTestCase(JexlEngine jexl)
|
|
JexlTestCase(String name)
|
protected |
JexlTestCase(String name,
JexlEngine jexl)
|
| Method Summary | |
|---|---|
static JexlEngine |
createEngine(boolean lenient)
|
static JexlEngine |
createThreadedArithmeticEngine(boolean lenient)
|
static void |
debuggerCheck(JexlEngine jexl)
Will force testing the debugger for each derived test class by recreating each expression from the JexlNode in the JexlEngine cache & testing them for equality with the origin. |
protected static ArrayList<JexlNode> |
flatten(JexlNode node)
Creates a list of all descendants of a script including itself. |
protected String |
flattenedStr(Script e)
A helper class to help debug AST problems. |
static void |
main(String[] args)
Runs a test. |
void |
runTest(String name)
Dynamically runs a test method. |
static void |
runTest(String tname,
String mname)
Instantiate and runs a test method; useful for debugging purpose. |
protected void |
tearDown()
|
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final JexlEngine JEXL
| Constructor Detail |
|---|
public JexlTestCase(String name)
protected JexlTestCase(String name,
JexlEngine jexl)
public JexlTestCase()
protected JexlTestCase(JexlEngine jexl)
| Method Detail |
|---|
protected void tearDown()
throws Exception
tearDown in class junit.framework.TestCaseExceptionpublic static JexlEngine createEngine(boolean lenient)
public static JexlEngine createThreadedArithmeticEngine(boolean lenient)
public static void debuggerCheck(JexlEngine jexl)
throws Exception
Exceptionprotected static ArrayList<JexlNode> flatten(JexlNode node)
script - the script to flatten
protected String flattenedStr(Script e)
e - the script
public void runTest(String name)
throws Exception
name - the test method to run
Exception - if anything goes wrong
public static void runTest(String tname,
String mname)
throws Exception
public static void main(String[] args) throws Exception {
runTest("BitwiseOperatorTest","testAndVariableNumberCoercion");
}
tname - the test class namemname - the test class method
Exception
public static void main(String[] args)
throws Exception
args - where args[0] is the test class name and args[1] the test class method
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||