|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--org.apache.velocity.test.EventHandlingTestCase
Tests event handling
Field Summary | |
private boolean |
exceptionSwitch
|
private java.lang.String |
logString
|
private static java.lang.String |
NO_REFERENCE_VALUE
|
private static java.lang.String |
REFERENCE_VALUE
|
Fields inherited from class junit.framework.TestCase |
fName |
Fields inherited from interface org.apache.velocity.runtime.log.LogSystem |
DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID |
Constructor Summary | |
EventHandlingTestCase()
Default constructor. |
Method Summary | |
void |
init(RuntimeServices rs)
init() |
void |
logVelocityMessage(int level,
java.lang.String message)
handler for LogSystem interface |
java.lang.Object |
methodException(java.lang.Class claz,
java.lang.String method,
java.lang.Exception e)
Handles exceptions thrown during in-template method access |
java.lang.Object |
referenceInsert(java.lang.String reference,
java.lang.Object value)
Event handler for when a reference is inserted into the output stream. |
void |
runTest()
Runs the test. |
boolean |
shouldLogOnNullSet(java.lang.String lhs,
java.lang.String rhs)
Event handler for when the right hand side of a #set() directive is null, which results in a log message. |
static junit.framework.Test |
suite()
|
void |
throwException()
silly method to throw an exception to test the method invocation exception event handling |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String logString
private boolean exceptionSwitch
private static java.lang.String NO_REFERENCE_VALUE
private static java.lang.String REFERENCE_VALUE
Constructor Detail |
public EventHandlingTestCase()
Method Detail |
public void init(RuntimeServices rs)
LogSystem
init
in interface LogSystem
public static junit.framework.Test suite()
public void runTest()
runTest
in class junit.framework.TestCase
public void throwException() throws java.lang.Exception
public java.lang.Object referenceInsert(java.lang.String reference, java.lang.Object value)
referenceInsert
in interface ReferenceInsertionEventHandler
org.apache.velocity.app.event.ReferenceInsertionEventHandler
reference
- Reference from template about to be inserted.value
- Value about to be inserted (after its
toString()
method is called).toString()
should be
called for output.public boolean shouldLogOnNullSet(java.lang.String lhs, java.lang.String rhs)
shouldLogOnNullSet
in interface NullSetEventHandler
org.apache.velocity.app.event.NullSetEventHandler
lhs
- reference literal of left-hand-side of set statementrhs
- reference literal of right-hand-side of set statementpublic java.lang.Object methodException(java.lang.Class claz, java.lang.String method, java.lang.Exception e) throws java.lang.Exception
methodException
in interface MethodExceptionEventHandler
public void logVelocityMessage(int level, java.lang.String message)
logVelocityMessage
in interface LogSystem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |