commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/define suite.jelly
Date Wed, 28 Aug 2002 09:19:57 GMT
jstrachan    2002/08/28 02:19:57

  Modified:    jelly/src/test/org/apache/commons/jelly/define suite.jelly
  Log:
  New JellyUnit test case for the <define:dynabean/> tag
  
  Revision  Changes    Path
  1.3       +38 -0     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/define/suite.jelly
  
  Index: suite.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/define/suite.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- suite.jelly	27 Aug 2002 14:09:22 -0000	1.2
  +++ suite.jelly	28 Aug 2002 09:19:57 -0000	1.3
  @@ -60,4 +60,42 @@
   
   </test:case>
      
  +
  +<test:case name="dynaBeans" 
  +	xmlns:dynabean="jelly:dynabean"
  +	xmlns:my="dynamicDynaBeanTest">
  +
  +	<!-- create a DynaClass -->
  +  <dynabean:dynaclass var="CustomerType" name="CustomerDynaClass"> 
  +		<dynabean:property name="name" type="String" />
  +		<dynabean:property name="address" type="String" />
  +	</dynabean:dynaclass>
  +
  +  <!-- Create a new tag library binding the dynabeans. -->
  +  <define:taglib uri="dynamicDynaBeanTest">
  +    <define:dynaBean
  +      name="customer"
  +      dynaClass="${CustomerType}"
  +    />
  +  </define:taglib>
  +
  +	<!-- now lets create a customer -->
  +	<my:customer var="customer" name="Customer 1" address="Address of Customer 1" />
  +
  +	<test:assert test="${customer != null}">Created a customer DynaBean</test:assert>
  +	
  +	<test:assertEquals 
  +		expected="Customer 1" 
  +		actual="${customer.name}"/>
  +		
  +	<test:assertEquals 
  +		expected="Address of Customer 1" 
  +		actual="${customer.address}"/>
  +		
  +	<test:assertEquals 
  +		expected="CustomerDynaClass" 
  +		actual="${customer.dynaClass.name}"/>
  +
  +</test:case>
  +   
   </test:suite>
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message