tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse MissingRequiredExtendedAttribute.page AttributeAndBody.page SpecificationParserTest.java StaticBindingValue.page PropertyValue.page
Date Fri, 07 Feb 2003 04:24:16 GMT
hlship      2003/02/06 20:24:16

  Modified:    junit/src/net/sf/tapestry/junit/parse
                        SpecificationParserTest.java
                        StaticBindingValue.page PropertyValue.page
  Added:       junit/src/net/sf/tapestry/junit/parse
                        MissingRequiredExtendedAttribute.page
                        AttributeAndBody.page
  Log:
  Add and update tests related to changes in the 1.4 specification DTD.
  
  Revision  Changes    Path
  1.14      +52 -20    jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/SpecificationParserTest.java
  
  Index: SpecificationParserTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/SpecificationParserTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SpecificationParserTest.java	24 Jan 2003 00:49:37 -0000	1.13
  +++ SpecificationParserTest.java	7 Feb 2003 04:24:15 -0000	1.14
  @@ -292,7 +292,7 @@
           catch (DocumentParseException ex)
           {
               checkException(ex, "Invalid$Component");
  -            checkException(ex, "alias");
  +            checkException(ex, "type");
           }
       }
   
  @@ -449,6 +449,22 @@
           assertEquals("hudson", c.getBinding("rock").getValue());
       }
   
  +    public void testAttributeAndBody() throws Exception
  +    {
  +        try
  +        {
  +            parsePage("AttributeAndBody.page");
  +
  +            unreachable();
  +        }
  +        catch (DocumentParseException ex)
  +        {
  +            checkException(
  +                ex,
  +                "It is not valid to specify a value for attribute 'value' of <static-binding>
and provide a value in the body of the element.");
  +        }
  +    }
  +
       /**
        *  Tests the new (in DTD 1.4) value attribute on a configure element.
        * 
  @@ -507,8 +523,8 @@
           return buffer.toString();
       }
   
  -	/** @since 2.4 **/
  -	
  +    /** @since 2.4 **/
  +
       public void testPropertySpecifications() throws Exception
       {
           ComponentSpecification spec = parsePage("PropertySpecifications.page");
  @@ -540,22 +556,38 @@
   
           assertNull("Unknown PropertySpecification", ps);
       }
  -    
  +
  +    /** @since 2.4 **/
  +
  +    public void testDuplicatePropertySpecification() throws Exception
  +    {
  +        try
  +        {
  +            parsePage("DuplicatePropertySpecification.page");
  +
  +            unreachable();
  +        }
  +        catch (IllegalArgumentException ex)
  +        {
  +            checkException(ex, "already contains property specification for property 'bool'");
  +        }
  +    }
  +
       /** @since 2.4 **/
  -    
  -    public void testDuplicatePropertySpecification()
  -    throws Exception
  -    {
  -    	try
  -    	{
  -    		parsePage("DuplicatePropertySpecification.page");
  -    		
  -    		unreachable();
  -    	}
  -    	catch (IllegalArgumentException ex)
  -    	{
  -    		checkException(ex, "already contains property specification for property 'bool'");
  		
  -    	}
  +
  +    public void testMissingRequiredExtendedAttribute() throws Exception
  +    {
  +        try
  +        {
  +            parsePage("MissingRequiredExtendedAttribute.page");
  +
  +            unreachable();
  +        }
  +        catch (DocumentParseException ex)
  +        {
  +            checkException(
  +                ex,
  +                "Element <binding> does not specify a value for attribute 'expression',
or contain a body value.");
  +        }
       }
  -     
   }
  
  
  
  1.4       +2 -2      jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/StaticBindingValue.page
  
  Index: StaticBindingValue.page
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/StaticBindingValue.page,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StaticBindingValue.page	26 Jan 2003 02:59:13 -0000	1.3
  +++ StaticBindingValue.page	7 Feb 2003 04:24:15 -0000	1.4
  @@ -9,7 +9,7 @@
   	<component id="c" type="Insert">
   		<static-binding name="fred">flintstone</static-binding>
   		<static-binding name="barney" value="rubble"/>
  -		<static-binding name="rock" value="hudson">Ignored.</static-binding>
  +		<static-binding name="rock" value="hudson"/>
   	</component>
   	
   </page-specification>
  
  
  
  1.4       +2 -4      jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/PropertyValue.page
  
  Index: PropertyValue.page
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/PropertyValue.page,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PropertyValue.page	26 Jan 2003 02:59:13 -0000	1.3
  +++ PropertyValue.page	7 Feb 2003 04:24:15 -0000	1.4
  @@ -8,9 +8,7 @@
   
   	<property name="barney" value="rubble"/>
   
  -	<property name="wilma" value="flintstone">
  -		Ignored.
  -	</property>
  +	<property name="wilma" value="flintstone"/>
   	
   </page-specification>
   
  
  
  
  1.1                  jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/MissingRequiredExtendedAttribute.page
  
  Index: MissingRequiredExtendedAttribute.page
  ===================================================================
  <?xml version="1.0"?>
  <!-- $Id: MissingRequiredExtendedAttribute.page,v 1.1 2003/02/07 04:24:15 hlship Exp
$ -->
  <!DOCTYPE page-specification PUBLIC 
    "-//Apache Software Foundation//Tapestry Specification 1.4//EN" 
    "http://jakarta.apache.org/tapestry/dtd/Tapestry_1_4.dtd">
       	
  <page-specification>
  
  	<component id="c" type="Insert">
  		<binding name="fred"/>
  	</component>
  	
  </page-specification>
  
  
  
  
  1.1                  jakarta-tapestry/junit/src/net/sf/tapestry/junit/parse/AttributeAndBody.page
  
  Index: AttributeAndBody.page
  ===================================================================
  <?xml version="1.0"?>
  <!-- $Id: AttributeAndBody.page,v 1.1 2003/02/07 04:24:15 hlship Exp $ -->
  <!DOCTYPE page-specification PUBLIC 
    "-//Apache Software Foundation//Tapestry Specification 1.4//EN" 
    "http://jakarta.apache.org/tapestry/dtd/Tapestry_1_4.dtd">
       	
  <page-specification>
  
  	<component id="c" type="Insert">
  		<static-binding name="fred" value="error">flintstone</static-binding>
  	</component>
  	
  </page-specification>
  
  
  
  

Mime
View raw message