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 778045 2009-05-23 22:17:46Z nbubna $
Author:
Will Glass-Husain

Field Summary
 
Fields inherited from class org.apache.velocity.test.BaseTestCase
context, DEBUG, engine, log, stringRepoName
 
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 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 testStopAndBreak()
          Test #stop and #break
 
Methods inherited from class org.apache.velocity.test.BaseTestCase
addTemplate, assertContextValue, assertEvalEquals, assertEvalException, assertEvalException, assertEvalExceptionAt, assertEvalExceptionAt, assertSchmoo, assertTmplEquals, assureResultsDirectoryExists, evaluate, getFileContents, getFileName, getFileName, getStringRepository, getTestCaseName, info, info, isMatch, isMatch, normalizeNewlines, removeTemplate, setUpContext, setUpEngine, 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

EvaluateTestCase

public EvaluateTestCase(String name)
Default constructor.

Parameters:
name -
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class BaseTestCase
Throws:
Exception

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

testStopAndBreak

public void testStopAndBreak()
Test #stop and #break

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


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