org.apache.tapestry.junit.parse
Class TestSpecificationParser

java.lang.Object
  extended by BaseComponentTestCase
      extended by org.apache.tapestry.junit.TapestryTestCase
          extended by org.apache.tapestry.junit.parse.TestSpecificationParser

public class TestSpecificationParser
extends TapestryTestCase

Tests the specification parser (which reads page and component specifications). Came into being somewhat late, so it just tests new features for the meantime.

Since:
2.0.4
Author:
Howard Lewis Ship

Field Summary
 
Fields inherited from class org.apache.tapestry.junit.TapestryTestCase
IS_JDK13
 
Constructor Summary
TestSpecificationParser()
           
 
Method Summary
 void tes_Message_Binding()
          Test 3.0 <message-binding> element.
 void test_Malformed_Xml_Tag()
           
 void testAssets_3_0()
          Tests that assets read using the 3.0 DTD are converted properly into paths with the proper prefix.
 void testAssets()
           
 void testAttributeAndBody()
           
 void testBeanDescription()
           
 void testBeanInitializer()
           
 void testBeanInject()
           
 void testBeanProperty()
           
 void testBeanSet()
           
 void testBinding40()
          Tests the 4.0 style <binding> element.
 void testComponentBadCopy()
          And here's what happens when copy-of doesn't match a known component.
 void testComponentCopyOf()
          Tests the use of copy-of attribute inside <component>.
 void testComponentInjectProperty()
           
 void testComponentProperty()
           
 void testComponentSlashInComponentType()
           
 void testComponentType()
          Test new DTD 1.4 syntax for declaring components.
 void testComponentWithoutType()
          Tests that <component> must have either type or copy-of attribute.
 void testComponentWithTypeAndCopyOf()
          Tests that a <component> element may not have both type and copy-of attributes.
 void testConfigureExtension()
           
 void testConfigureExtensionProperty()
           
 void testConfigureValue()
          Tests the new (in DTD 1.4) value attribute on a configure element.
 void testDeprecatedComponent()
           
 void testExpressionBeanInitializer()
          Tests the DTD 3.0 element
 void testInheritInformalParameters()
           
 void testInject()
           
 void testInvalidAssetName()
          Test invalid parameter name.
 void testInvalidComponentAlias()
          Test invalid component type ("alias" in older parlance).
 void testInvalidComponentId()
          Test invalid component id.
 void testInvalidExtensionName()
          Test invalid extension name.
 void testInvalidLibraryId()
          Test invalid library id in a library specification.
 void testInvalidPageName()
          Test invalid page name.
 void testInvalidParameterName()
          Test invalid parameter name.
 void testInvalidPublicId()
          Test case where the public id of the document is not known.
 void testLibraryDescription()
           
 void testLibraryFrameworkNamespace()
          Checks to make sure that a application or library may not defined a lbirary with id 'framework'.
 void testLibrarySlashInComponentType()
           
 void testListenerBinding()
          Tests the new <listener-binding> element in the 1.4 DTD.
 void testMessageBeanInitializer()
           
 void testMeta()
           
 void testMissingDoctype()
          Test case where the document does not have a DOCTYPE
 void testMissingRequiredExtendedAttribute()
           
 void testNulledApplication()
          Test an an application specification can omit the name and engine-class attributes.
 void testNulledComponent()
          Test omitting the class name from a component specification (new, in DTD 1.4).
 void testNulledPage()
          Test omitting the class name from a component specification (new, in DTD 1.4).
 void testPageDescription()
           
 void testParameter_3_0()
          Tests parameters specification from a 3.0 DTD
 void testParameter()
          Tests the new way default-value is interpreted (as a binding-like value, prefixed to indicate type).
 void testProperty()
          Test that the new <property> element (was <property-specification> in release 3.0) works correctly.
 void testPropertySpecifications()
           
 void testPropertyValue()
          Test the value attribute for the property element (which is new in DTD 1.4).
 void testRootElementMismatch()
          Excercies the check that the correct root element is used.
 void testStaticBindingValue()
          Tests the new (in DTD 1.4) value attribute on static-binding element.
 void testValidLibrary()
          Parse a valid library.
 void testValidParameterName()
          Test valid parameter name.
 
Methods inherited from class org.apache.tapestry.junit.TapestryTestCase
checkException, checkList, checkList, checkProperty, createValueConverter, getSpecificationResourceLocation, newBindingSource, newComponent, parseApp, parseComponent, parseLib, parsePage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSpecificationParser

public TestSpecificationParser()
Method Detail

tes_Message_Binding

public void tes_Message_Binding()
                         throws Exception
Test 3.0 <message-binding> element.

Throws:
Exception

testBinding40

public void testBinding40()
                   throws Exception
Tests the 4.0 style <binding> element.

Throws:
Exception

testValidParameterName

public void testValidParameterName()
                            throws Exception
Test valid parameter name.

Throws:
Exception
Since:
2.2

testInvalidParameterName

public void testInvalidParameterName()
                              throws Exception
Test invalid parameter name.

Throws:
Exception
Since:
2.2

testInvalidComponentId

public void testInvalidComponentId()
                            throws Exception
Test invalid component id.

Throws:
Exception
Since:
2.2

testInvalidLibraryId

public void testInvalidLibraryId()
                          throws Exception
Test invalid library id in a library specification.

Throws:
Exception
Since:
2.2

testValidLibrary

public void testValidLibrary()
                      throws Exception
Parse a valid library.

Throws:
Exception
Since:
2.2

testInvalidAssetName

public void testInvalidAssetName()
                          throws Exception
Test invalid parameter name.

Throws:
Exception
Since:
2.2

testInvalidPageName

public void testInvalidPageName()
                         throws Exception
Test invalid page name.

Throws:
Exception
Since:
2.2

testInvalidComponentAlias

public void testInvalidComponentAlias()
                               throws Exception
Test invalid component type ("alias" in older parlance).

Throws:
Exception
Since:
2.2

testInvalidExtensionName

public void testInvalidExtensionName()
                              throws Exception
Test invalid extension name.

Throws:
Exception
Since:
2.2

test_Malformed_Xml_Tag

public void test_Malformed_Xml_Tag()
                            throws Exception
Throws:
Exception

testMissingDoctype

public void testMissingDoctype()
                        throws Exception
Test case where the document does not have a DOCTYPE

Throws:
Exception
Since:
2.2

testInvalidPublicId

public void testInvalidPublicId()
                         throws Exception
Test case where the public id of the document is not known.

Throws:
Exception

testNulledApplication

public void testNulledApplication()
                           throws Exception
Test an an application specification can omit the name and engine-class attributes.

Throws:
Exception
Since:
3.0

testComponentType

public void testComponentType()
                       throws Exception
Test new DTD 1.4 syntax for declaring components.

Throws:
Exception
Since:
3.0

testNulledComponent

public void testNulledComponent()
                         throws Exception
Test omitting the class name from a component specification (new, in DTD 1.4).

Throws:
Exception

testNulledPage

public void testNulledPage()
                    throws Exception
Test omitting the class name from a component specification (new, in DTD 1.4).

Throws:
Exception

testPropertyValue

public void testPropertyValue()
                       throws Exception
Test the value attribute for the property element (which is new in DTD 1.4).

Throws:
Exception
Since:
3.0

testStaticBindingValue

public void testStaticBindingValue()
                            throws Exception
Tests the new (in DTD 1.4) value attribute on static-binding element.

Throws:
Exception
Since:
3.0

testAttributeAndBody

public void testAttributeAndBody()
                          throws Exception
Throws:
Exception

testConfigureValue

public void testConfigureValue()
                        throws Exception
Tests the new (in DTD 1.4) value attribute on a configure element.

Throws:
Exception
Since:
3.0

testListenerBinding

public void testListenerBinding()
                         throws Exception
Tests the new <listener-binding> element in the 1.4 DTD.

Throws:
Exception
Since:
3.0

testPropertySpecifications

public void testPropertySpecifications()
                                throws Exception
Throws:
Exception
Since:
3.0 *

testMissingRequiredExtendedAttribute

public void testMissingRequiredExtendedAttribute()
                                          throws Exception
Throws:
Exception
Since:
3.0 *

testMessageBeanInitializer

public void testMessageBeanInitializer()
                                throws Exception
Throws:
Exception
Since:
3.0 *

testExpressionBeanInitializer

public void testExpressionBeanInitializer()
                                   throws Exception
Tests the DTD 3.0 element

Throws:
Exception
Since:
4.0

testBeanSet

public void testBeanSet()
                 throws Exception
Throws:
Exception
Since:
4.0

testInheritInformalParameters

public void testInheritInformalParameters()
                                   throws Exception
Throws:
Exception

testConfigureExtension

public void testConfigureExtension()
                            throws Exception
Throws:
Exception
Since:
4.0

testConfigureExtensionProperty

public void testConfigureExtensionProperty()
                                    throws Exception
Throws:
Exception

testComponentProperty

public void testComponentProperty()
                           throws Exception
Throws:
Exception
Since:
4.0

testComponentInjectProperty

public void testComponentInjectProperty()
                                 throws Exception
Throws:
Exception
Since:
4.0

testBeanDescription

public void testBeanDescription()
                         throws Exception
Throws:
Exception
Since:
4.0

testBeanProperty

public void testBeanProperty()
                      throws Exception
Throws:
Exception
Since:
4.0

testBeanInject

public void testBeanInject()
                    throws Exception
Throws:
Exception
Since:
4.0

testBeanInitializer

public void testBeanInitializer()
                         throws Exception
Throws:
Exception
Since:
4.0

testLibraryDescription

public void testLibraryDescription()
                            throws Exception
Throws:
Exception
Since:
4.0

testPageDescription

public void testPageDescription()
                         throws Exception
Throws:
Exception
Since:
4.0

testRootElementMismatch

public void testRootElementMismatch()
                             throws Exception
Excercies the check that the correct root element is used.

Throws:
Exception
Since:
4.0

testLibraryFrameworkNamespace

public void testLibraryFrameworkNamespace()
                                   throws Exception
Checks to make sure that a application or library may not defined a lbirary with id 'framework'.

Throws:
Exception
Since:
4.0

testComponentWithTypeAndCopyOf

public void testComponentWithTypeAndCopyOf()
                                    throws Exception
Tests that a <component> element may not have both type and copy-of attributes.

Throws:
Exception
Since:
4.0

testComponentWithoutType

public void testComponentWithoutType()
                              throws Exception
Tests that <component> must have either type or copy-of attribute.

Throws:
Exception
Since:
4.0

testComponentCopyOf

public void testComponentCopyOf()
                         throws Exception
Tests the use of copy-of attribute inside <component>.

Throws:
Exception
Since:
4.0

testComponentBadCopy

public void testComponentBadCopy()
And here's what happens when copy-of doesn't match a known component.

Since:
4.0

testMeta

public void testMeta()
              throws Exception
Throws:
Exception
Since:
4.0

testInject

public void testInject()
                throws Exception
Throws:
Exception
Since:
4.0

testProperty

public void testProperty()
                  throws Exception
Test that the new <property> element (was <property-specification> in release 3.0) works correctly.

Throws:
Exception
Since:
4.0

testParameter_3_0

public void testParameter_3_0()
                       throws Exception
Tests parameters specification from a 3.0 DTD

Throws:
Exception
Since:
4.0

testParameter

public void testParameter()
                   throws Exception
Tests the new way default-value is interpreted (as a binding-like value, prefixed to indicate type).

Throws:
Exception
Since:
4.0

testAssets_3_0

public void testAssets_3_0()
                    throws Exception
Tests that assets read using the 3.0 DTD are converted properly into paths with the proper prefix.

Throws:
Exception
Since:
4.0

testAssets

public void testAssets()
                throws Exception
Throws:
Exception
Since:
4.0

testDeprecatedComponent

public void testDeprecatedComponent()
                             throws Exception
Throws:
Exception
Since:
4.0

testLibrarySlashInComponentType

public void testLibrarySlashInComponentType()
                                     throws Exception
Throws:
Exception
Since:
4.0

testComponentSlashInComponentType

public void testComponentSlashInComponentType()
                                       throws Exception
Throws:
Exception
Since:
4.0


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.