org.apache.velocity.test
Class BuiltInEventHandlerTestCase

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.BuiltInEventHandlerTestCase
All Implemented Interfaces:
junit.framework.Test, TemplateTestBase

public class BuiltInEventHandlerTestCase
extends BaseTestCase

Tests the operation of the built in event handlers.

Version:
$Id: BuiltInEventHandlerTestCase.java 809816 2009-09-01 05:14:27Z nbubna $
Author:
Will Glass-Husain

Field Summary
protected  boolean DEBUG
           
 
Fields inherited from class org.apache.velocity.test.BaseTestCase
context, 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
BuiltInEventHandlerTestCase(String name)
          Default constructor.
 
Method Summary
protected  void log(String out)
           
 void setUp()
           
static junit.framework.Test suite()
           
 void testEscapeHtml()
          Test escaping
 void testEscapeJavaScript()
          Test escaping
 void testEscapeReferenceMatch()
          test that escape reference handler works with match restrictions
 void testEscapeReferenceMatchAll()
          test that escape reference handler works with no match restrictions
 void testEscapeSql()
          Test escaping
 void testEscapeXml()
          Test escaping
 void testIncludeNotFound()
           
 void testIncludeNotFoundMissingResourceName()
           
 void testIncludeRelativePath()
           
 void testPrintExceptionHandler()
           
 void testReportInvalidReferences1()
          Test reporting of invalid syntax
 void testReportInvalidReferences2()
           
 
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
 

Field Detail

DEBUG

protected boolean DEBUG
Constructor Detail

BuiltInEventHandlerTestCase

public BuiltInEventHandlerTestCase(String name)
Default constructor.

Method Detail

setUp

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

suite

public static junit.framework.Test suite()

log

protected void log(String out)

testReportInvalidReferences1

public void testReportInvalidReferences1()
                                  throws Exception
Test reporting of invalid syntax

Throws:
Exception

testReportInvalidReferences2

public void testReportInvalidReferences2()
                                  throws Exception
Throws:
Exception

testEscapeHtml

public void testEscapeHtml()
                    throws Exception
Test escaping

Throws:
Exception

testEscapeXml

public void testEscapeXml()
                   throws Exception
Test escaping

Throws:
Exception

testEscapeSql

public void testEscapeSql()
                   throws Exception
Test escaping

Throws:
Exception

testEscapeJavaScript

public void testEscapeJavaScript()
                          throws Exception
Test escaping

Throws:
Exception

testEscapeReferenceMatchAll

public void testEscapeReferenceMatchAll()
                                 throws Exception
test that escape reference handler works with no match restrictions

Throws:
Exception

testEscapeReferenceMatch

public void testEscapeReferenceMatch()
                              throws Exception
test that escape reference handler works with match restrictions

Throws:
Exception

testPrintExceptionHandler

public void testPrintExceptionHandler()
                               throws Exception
Throws:
Exception

testIncludeNotFound

public void testIncludeNotFound()
                         throws Exception
Throws:
Exception

testIncludeNotFoundMissingResourceName

public void testIncludeNotFoundMissingResourceName()
                                            throws Exception
Throws:
Exception

testIncludeRelativePath

public void testIncludeRelativePath()
                             throws Exception
Throws:
Exception


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