org.apache.velocity.test
Class BaseEvalTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.velocity.test.BaseEvalTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ArrayMethodsTestCase, DefineTestCase, ForeachBreakTestCase, IfNullTestCase, PropertyMethodPrecedenceTestCase, StaticUtilityMethodsTestCase, StrictForeachTestCase, StrictMathTestCase, StrictReferenceTestCase, StringConcatenationTestCase, URLResourceLoaderTimeoutTestCase, VarargMethodsTestCase, Velocity355And552TestCase, Velocity532TestCase, Velocity544TestCase, Velocity579TestCase, Velocity587TestCase, Velocity589TestCase, Velocity614TestCase, Velocity616TestCase, Velocity625TestCase, Velocity627TestCase, Velocity629TestCase, Velocity62TestCase, Velocity630TestCase, Velocity631TestCase, Velocity644TestCase

public class BaseEvalTestCase
extends junit.framework.TestCase

Base for test cases that use evaluate, instead of going through the resource loaders.


Field Summary
protected  VelocityContext context
           
protected  boolean DEBUG
           
protected  VelocityEngine engine
           
protected  TestLogChute log
           
 
Constructor Summary
BaseEvalTestCase(String name)
           
 
Method Summary
protected  void assertContextValue(String key, Object expected)
           
protected  void assertEvalEquals(String expected, String template)
           
protected  Exception assertEvalException(String evil)
           
protected  Exception assertEvalException(String evil, Class exceptionType)
           
protected  Exception assertEvalExceptionAt(String evil, int line, int col)
           
protected  Exception assertEvalExceptionAt(String evil, String template, int line, int col)
           
protected  String evaluate(String template)
           
protected  void setContext(VelocityContext context)
           
protected  void setProperties(VelocityEngine engine)
           
 void setUp()
           
 void tearDown()
           
 void 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
 

Field Detail

engine

protected VelocityEngine engine

context

protected VelocityContext context

DEBUG

protected boolean DEBUG

log

protected TestLogChute log
Constructor Detail

BaseEvalTestCase

public BaseEvalTestCase(String name)
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

testBase

public void testBase()

setProperties

protected void setProperties(VelocityEngine engine)

setContext

protected void setContext(VelocityContext context)

assertContextValue

protected void assertContextValue(String key,
                                  Object expected)

assertEvalEquals

protected void assertEvalEquals(String expected,
                                String template)

assertEvalException

protected Exception assertEvalException(String evil)

assertEvalException

protected Exception assertEvalException(String evil,
                                        Class exceptionType)

assertEvalExceptionAt

protected Exception assertEvalExceptionAt(String evil,
                                          String template,
                                          int line,
                                          int col)

assertEvalExceptionAt

protected Exception assertEvalExceptionAt(String evil,
                                          int line,
                                          int col)

evaluate

protected String evaluate(String template)


Copyright © 2000-2008 The Apache Software Foundation. All Rights Reserved.