|
||||||||||
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.velocity.test.BaseEvalTestCase
org.apache.velocity.test.StrictReferenceTestCase
public class StrictReferenceTestCase
Test strict reference mode turned on by the velocity property runtime.references.strict
Nested Class Summary | |
---|---|
static class |
StrictReferenceTestCase.Fargo
|
Field Summary |
---|
Fields inherited from class org.apache.velocity.test.BaseEvalTestCase |
---|
context, DEBUG, engine, log |
Constructor Summary | |
---|---|
StrictReferenceTestCase(String name)
|
Method Summary | |
---|---|
void |
assertMethodEx(String template)
Assert that we get a MethodInvocationException when calling evaluate |
void |
assertParseEx(String template)
Assert that we get a MethodInvocationException when calling evaluate |
void |
assertVelocityEx(String template)
Assert that we get a VelocityException when calling evaluate |
void |
setUp()
|
void |
testAllowNullValues()
We make sure that variables can actuall hold null values. |
void |
testIfStatement()
Test the modified behavior of #if in strict mode. |
void |
testMacros()
Make sure undefined macros throw exceptions |
void |
testStrictMethodOnNull()
Make sure exceptions are thrown when when we attempt to call methods on null values. |
void |
testStrictMethodRef()
Test that exceptions are thrown when methods are called on references that contains objects that do not contains those methods. |
void |
testStrictVariableRef()
Test that variables references that have not been defined throw exceptions |
Methods inherited from class org.apache.velocity.test.BaseEvalTestCase |
---|
assertContextValue, assertEvalEquals, assertEvalException, assertEvalException, assertEvalExceptionAt, assertEvalExceptionAt, evaluate, setContext, setProperties, tearDown, testBase |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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 StrictReferenceTestCase(String name)
Method Detail |
---|
public void setUp() throws Exception
setUp
in class BaseEvalTestCase
Exception
public void testIfStatement()
public void testAllowNullValues() throws Exception
Exception
public void testStrictVariableRef() throws Exception
Exception
public void testStrictMethodRef()
public void testStrictMethodOnNull()
public void testMacros()
public void assertMethodEx(String template)
public void assertVelocityEx(String template)
public void assertParseEx(String template)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |