org.apache.velocity.test
Class EvaluateTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.velocity.test.BaseTestCase
              extended by org.apache.velocity.test.EvaluateTestCase
All Implemented Interfaces:
junit.framework.Test, TemplateTestBase

public class EvaluateTestCase
extends BaseTestCase

Test #evaluate directive.

Version:
$Id: EvaluateTestCase.java 685287 2008-08-12 20:06:31Z nbubna $
Author:
Will Glass-Husain

Field Summary
 
Fields inherited from interface org.apache.velocity.test.TemplateTestBase
RESULT_DIR, TEST_CASE_PROPERTIES, TEST_COMPARE_DIR, TEST_RESULT_DIR
 
Constructor Summary
EvaluateTestCase(String name)
          Default constructor.
 
Method Summary
 void setUp()
           
 void setupContext(Context context)
           
static junit.framework.Test suite()
           
 void testErrors()
          Test errors are thrown
 void testEvaluate()
          Test basic functionality.
 void testEvaluateMacroPreserve()
          Test evaluate directive preserves macros (VELOCITY-591)
 void testEvaluateVMContext()
          Test in a macro context.
 void testEventHandler()
          Test that the event handlers work in #evaluate (since they are attached to the context).
 void testStop()
          Test #stop (since it is attached to context).
 
Methods inherited from class org.apache.velocity.test.BaseTestCase
assureResultsDirectoryExists, getFileContents, getFileName, getFileName, getTestCaseName, isMatch, isMatch, normalizeNewlines
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

EvaluateTestCase

public EvaluateTestCase(String name)
Default constructor.

Parameters:
name -
Method Detail

setUp

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

suite

public static junit.framework.Test suite()

testEvaluate

public void testEvaluate()
                  throws Exception
Test basic functionality.

Throws:
Exception

testEvaluateMacroPreserve

public void testEvaluateMacroPreserve()
                               throws Exception
Test evaluate directive preserves macros (VELOCITY-591)

Throws:
Exception

testEvaluateVMContext

public void testEvaluateVMContext()
                           throws Exception
Test in a macro context.

Throws:
Exception

testStop

public void testStop()
              throws Exception
Test #stop (since it is attached to context).

Throws:
Exception

testEventHandler

public void testEventHandler()
                      throws Exception
Test that the event handlers work in #evaluate (since they are attached to the context). Only need to check one - they all work the same.

Throws:
Exception

testErrors

public void testErrors()
                throws Exception
Test errors are thrown

Throws:
Exception

setupContext

public void setupContext(Context context)


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