|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBaseComponentTestCase
org.apache.tapestry.junit.parse.TestTemplateParser
public class TestTemplateParser
Tests for the Tapestry HTML template parser.
Constructor Summary | |
---|---|
TestTemplateParser()
|
Method Summary | |
---|---|
protected void |
assertCloseToken(TemplateToken token,
int line)
|
protected void |
assertLocalizationToken(TemplateToken token,
String key,
Map attributes,
int line)
|
protected void |
assertOpenToken(TemplateToken token,
String id,
String tag,
int line)
|
protected void |
assertOpenToken(TemplateToken token,
String id,
String componentType,
String tag,
int line)
|
protected void |
assertTemplateAttributes(TemplateToken token,
Map expected)
|
protected void |
assertText(TextToken token,
int offset,
int length)
|
protected void |
assertTextToken(TemplateToken token,
int startIndex,
int endIndex)
|
protected void |
assertTokenCount(TemplateToken[] tokens,
int count)
|
protected void |
checkLine(TemplateToken token,
int line)
|
protected TemplateToken[] |
run(char[] templateData,
ITemplateParserDelegate delegate,
org.apache.hivemind.Resource location)
|
protected TemplateToken[] |
run(InputStream stream,
ITemplateParserDelegate delegate,
org.apache.hivemind.Resource location)
|
protected TemplateToken[] |
run(String file)
|
protected TemplateToken[] |
run(String file,
ITemplateParserDelegate delegate)
|
void |
test_Basic_Localization()
|
void |
test_Empty_Localization()
Test that the abbreviated form (a tag with no body) works. |
void |
testAllStatic()
|
void |
testBasicContent()
|
void |
testBasicRemove()
|
void |
testBodyRemove()
|
void |
testComplex()
|
void |
testComponentInsideLocalization()
Test that the parser fails if a localization block contains a component. |
void |
testDuplicateTagAttributeFailure()
|
void |
testDuplicateTagAttributeFailureSingleQuotes()
|
void |
testEncodedExpressionCharacters()
Test for encoded characters in an expression. |
void |
testIgnoredContentFailure()
|
void |
testImplicitComponents()
Tests for implicit components (both named and anonymous). |
void |
testIncompleteCloseFailure()
|
void |
testInvalidDynamicNestingFailure()
|
void |
testLocalizationAttributes()
Test attributes in the span. |
void |
testMismatchedCloseTagsFailure()
|
void |
testMissingAttributeValueFailure()
|
void |
testMixedNesting()
|
void |
testNamespaceAttributeName()
Like testOverrideDefaultAttributeName() , but uses a more complicated attribute name
(with a XML-style namespace prefix). |
void |
testNestedLocalizations()
Test that the parser fails if an invisible localization is nested within another invisible localization. |
void |
testNestedRemoveFailure()
|
void |
testOverrideDefaultAttributeName()
Test ability to use a different attribute name than the default ("jwcid"). |
void |
testRemovedComponentFailure()
|
void |
testSimpleNested()
|
void |
testSingleEmptyTag()
|
void |
testSingleQuotes()
|
void |
testSlashInComponentType()
|
void |
testStartWithStaticTag()
|
void |
testStringAttributes()
Test ability to read string attributes. |
void |
testTagAttributes()
|
void |
testUnclosedOpenTagFailure()
|
void |
testUnknownComponentIdFailure()
|
void |
testUnterminatedCommentFailure()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestTemplateParser()
Method Detail |
---|
protected TemplateToken[] run(char[] templateData, ITemplateParserDelegate delegate, org.apache.hivemind.Resource location) throws TemplateParseException
TemplateParseException
protected TemplateToken[] run(InputStream stream, ITemplateParserDelegate delegate, org.apache.hivemind.Resource location) throws TemplateParseException
TemplateParseException
protected TemplateToken[] run(String file) throws TemplateParseException
TemplateParseException
protected TemplateToken[] run(String file, ITemplateParserDelegate delegate) throws TemplateParseException
TemplateParseException
protected void assertTextToken(TemplateToken token, int startIndex, int endIndex)
protected void assertText(TextToken token, int offset, int length)
protected void checkLine(TemplateToken token, int line)
protected void assertLocalizationToken(TemplateToken token, String key, Map attributes, int line)
protected void assertOpenToken(TemplateToken token, String id, String tag, int line)
protected void assertOpenToken(TemplateToken token, String id, String componentType, String tag, int line)
protected void assertTemplateAttributes(TemplateToken token, Map expected)
protected void assertCloseToken(TemplateToken token, int line)
protected void assertTokenCount(TemplateToken[] tokens, int count)
public void testAllStatic() throws TemplateParseException
TemplateParseException
public void testSingleEmptyTag() throws TemplateParseException
TemplateParseException
public void testSimpleNested() throws TemplateParseException
TemplateParseException
public void testMixedNesting() throws TemplateParseException
TemplateParseException
public void testSingleQuotes() throws TemplateParseException
TemplateParseException
public void testComplex() throws TemplateParseException
TemplateParseException
public void testStartWithStaticTag() throws TemplateParseException
TemplateParseException
public void testUnterminatedCommentFailure()
public void testUnclosedOpenTagFailure()
public void testMissingAttributeValueFailure()
public void testIncompleteCloseFailure()
public void testMismatchedCloseTagsFailure()
public void testInvalidDynamicNestingFailure()
public void testUnknownComponentIdFailure()
public void testBasicRemove() throws TemplateParseException
TemplateParseException
public void testBodyRemove() throws TemplateParseException
TemplateParseException
public void testRemovedComponentFailure()
public void testNestedRemoveFailure()
public void testBasicContent() throws TemplateParseException
TemplateParseException
public void testIgnoredContentFailure()
public void testTagAttributes() throws TemplateParseException
TemplateParseException
public void test_Basic_Localization() throws TemplateParseException
TemplateParseException
public void testComponentInsideLocalization()
public void testNestedLocalizations()
public void test_Empty_Localization() throws TemplateParseException
TemplateParseException
public void testLocalizationAttributes() throws TemplateParseException
TemplateParseException
public void testImplicitComponents() throws TemplateParseException
TemplateParseException
public void testEncodedExpressionCharacters() throws TemplateParseException
TemplateParseException
public void testStringAttributes() throws TemplateParseException
TemplateParseException
public void testOverrideDefaultAttributeName() throws Exception
Exception
public void testNamespaceAttributeName() throws Exception
testOverrideDefaultAttributeName()
, but uses a more complicated attribute name
(with a XML-style namespace prefix).
Exception
public void testDuplicateTagAttributeFailure()
public void testDuplicateTagAttributeFailureSingleQuotes()
public void testSlashInComponentType() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |