net.sf.tapestry.junit.parse
Class TemplateParserTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--net.sf.tapestry.junit.parse.TemplateParserTest
All Implemented Interfaces:
Test

public class TemplateParserTest
extends TestCase

Tests for the Tapestry HTML template parser.

Version:
$Id: TemplateParserTest.java,v 1.7 2001/10/08 18:28:40 hship Exp $
Author:
Howard Ship

Constructor Summary
TemplateParserTest(java.lang.String name)
           
 
Method Summary
protected  void assertCloseToken(TemplateToken token)
           
protected  void assertOpenToken(TemplateToken token, java.lang.String id)
           
protected  void assertTextToken(TemplateToken token, int startIndex, int endIndex)
           
protected  void assertTokenCount(TemplateToken[] tokens, int count)
           
protected  TemplateToken[] run(char[] templateData, ITemplateParserDelegate delegate, java.lang.String resourcePath)
           
protected  TemplateToken[] run(java.io.InputStream stream, ITemplateParserDelegate delegate, java.lang.String resourcePath)
           
protected  TemplateToken[] run(java.lang.String file)
           
protected  TemplateToken[] run(java.lang.String file, ITemplateParserDelegate delegate)
           
protected  void setUp()
           
static Test suite()
           
protected  void tearDown()
           
 void testAllStatic()
           
 void testBasicContent()
           
 void testBasicRemove()
           
 void testBodyRemove()
           
 void testComplex()
           
 void testIgnoredContentFailure()
           
 void testIncompleteCloseFailure()
           
 void testInvalidDynamicNestingFailure()
           
 void testInvalidJwcAttributeFailure()
           
 void testMismatchedCloseTagsFailure()
           
 void testMissignAttributeValueFailure()
           
 void testMissingJwcIdFailure()
           
 void testMixedNesting()
           
 void testNestedRemoveFailure()
           
 void testRemovedComponentFailure()
           
 void testSimpleNested()
           
 void testSingleEmptyTag()
           
 void testSingleQuotes()
           
 void testStartWithStaticTag()
           
 void testTagAttributes()
           
 void testUnclosedOpenTagFailure()
           
 void testUnknownComponentIdFailure()
           
 void testUnterminatedCommentFailure()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, name, run, run, runBare, runTest, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateParserTest

public TemplateParserTest(java.lang.String name)
Method Detail

suite

public static Test suite()

setUp

protected void setUp()
Overrides:
setUp in class TestCase

tearDown

protected void tearDown()
Overrides:
tearDown in class TestCase

run

protected TemplateToken[] run(char[] templateData,
                              ITemplateParserDelegate delegate,
                              java.lang.String resourcePath)
                       throws TemplateParseException

run

protected TemplateToken[] run(java.io.InputStream stream,
                              ITemplateParserDelegate delegate,
                              java.lang.String resourcePath)
                       throws TemplateParseException

run

protected TemplateToken[] run(java.lang.String file)
                       throws TemplateParseException

run

protected TemplateToken[] run(java.lang.String file,
                              ITemplateParserDelegate delegate)
                       throws TemplateParseException

assertTextToken

protected void assertTextToken(TemplateToken token,
                               int startIndex,
                               int endIndex)

assertOpenToken

protected void assertOpenToken(TemplateToken token,
                               java.lang.String id)

assertCloseToken

protected void assertCloseToken(TemplateToken token)

assertTokenCount

protected void assertTokenCount(TemplateToken[] tokens,
                                int count)

testAllStatic

public void testAllStatic()
                   throws TemplateParseException

testSingleEmptyTag

public void testSingleEmptyTag()
                        throws TemplateParseException

testSimpleNested

public void testSimpleNested()
                      throws TemplateParseException

testMixedNesting

public void testMixedNesting()
                      throws TemplateParseException

testSingleQuotes

public void testSingleQuotes()
                      throws TemplateParseException

testComplex

public void testComplex()
                 throws TemplateParseException

testStartWithStaticTag

public void testStartWithStaticTag()
                            throws TemplateParseException

testUnterminatedCommentFailure

public void testUnterminatedCommentFailure()

testUnclosedOpenTagFailure

public void testUnclosedOpenTagFailure()

testMissignAttributeValueFailure

public void testMissignAttributeValueFailure()

testMissingJwcIdFailure

public void testMissingJwcIdFailure()

testIncompleteCloseFailure

public void testIncompleteCloseFailure()

testMismatchedCloseTagsFailure

public void testMismatchedCloseTagsFailure()

testInvalidDynamicNestingFailure

public void testInvalidDynamicNestingFailure()

testUnknownComponentIdFailure

public void testUnknownComponentIdFailure()

testBasicRemove

public void testBasicRemove()
                     throws TemplateParseException

testBodyRemove

public void testBodyRemove()
                    throws TemplateParseException

testRemovedComponentFailure

public void testRemovedComponentFailure()

testNestedRemoveFailure

public void testNestedRemoveFailure()

testInvalidJwcAttributeFailure

public void testInvalidJwcAttributeFailure()

testBasicContent

public void testBasicContent()
                      throws TemplateParseException

testIgnoredContentFailure

public void testIgnoredContentFailure()

testTagAttributes

public void testTagAttributes()
                       throws TemplateParseException