|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.apache.velocity.test.EventHandlingTestCase
public class EventHandlingTestCase
Tests event handling
Constructor Summary | |
---|---|
EventHandlingTestCase()
Default constructor. |
Method Summary | |
---|---|
void |
init(RuntimeServices rs)
|
void |
logVelocityMessage(int level,
String message)
handler for LogSystem interface |
Object |
methodException(Class claz,
String method,
Exception e)
Handles exceptions thrown during in-template method access |
Object |
referenceInsert(String reference,
Object value)
Event handler for when a reference is inserted into the output stream. |
void |
runTest()
Runs the test. |
boolean |
shouldLogOnNullSet(String lhs,
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, run, run, runBare, setName, setUp, tearDown, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventHandlingTestCase()
Method Detail |
---|
public void init(RuntimeServices rs)
public static junit.framework.Test suite()
public void runTest()
runTest
in class junit.framework.TestCase
public void throwException() throws Exception
Exception
public Object referenceInsert(String reference, Object value)
referenceInsert
in interface 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(String lhs, String rhs)
shouldLogOnNullSet
in interface NullSetEventHandler
lhs
- reference literal of left-hand-side of set statementrhs
- reference literal of right-hand-side of set statement
public Object methodException(Class claz, String method, Exception e) throws Exception
methodException
in interface MethodExceptionEventHandler
Exception
public void logVelocityMessage(int level, String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |