org.apache.velocity.test
Class ParserTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.velocity.test.ParserTestCase
All Implemented Interfaces:
junit.framework.Test

public class ParserTestCase
extends junit.framework.TestCase

More specific parser tests where just templating isn't enough.

Version:
$Id: ParserTestCase.java 463298 2006-10-12 16:10:32Z henning $
Author:
Geir Magnusson Jr.

Nested Class Summary
static class ParserTestCase.ToStringCounter
           
 
Constructor Summary
ParserTestCase(String testName)
           
 
Method Summary
static junit.framework.Test suite()
           
 void testArgs()
          Test to see if don't tolerage passing word tokens in anything but the 0th arg to #macro() and the 1th arg to foreach()
 void testASTReferenceToStringOnlyCalledOnce()
          Test to see if we toString is called multiple times on references.
 void testEquals()
          Test to make sure that using '=' in #if() throws a PEE
 void testMacro()
          Test to see if we force the first arg to #macro() to be a word
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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

ParserTestCase

public ParserTestCase(String testName)
Method Detail

suite

public static junit.framework.Test suite()

testEquals

public void testEquals()
                throws Exception
Test to make sure that using '=' in #if() throws a PEE

Throws:
Exception

testMacro

public void testMacro()
               throws Exception
Test to see if we force the first arg to #macro() to be a word

Throws:
Exception

testArgs

public void testArgs()
              throws Exception
Test to see if don't tolerage passing word tokens in anything but the 0th arg to #macro() and the 1th arg to foreach()

Throws:
Exception

testASTReferenceToStringOnlyCalledOnce

public void testASTReferenceToStringOnlyCalledOnce()
                                            throws Exception
Test to see if we toString is called multiple times on references.

Throws:
Exception


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