CVS: Tapestry/junit/src/net/sf/tapestry/junit/mock TestRelative.xml,NONE,1.1.2.1 MockTestCase.java,1.10.2.8,1.10.2.9

Howard Lewis Ship <[email protected]>
Newsgroups gmane.comp.java.tapestry.cvs
Message-ID <[email protected]>
Update of /cvsroot/tapestry/Tapestry/junit/src/net/sf/tapestry/junit/mock
In directory sc8-pr-cvs1:/tmp/cvs-serv7216/junit/src/net/sf/tapestry/junit/mock

Modified Files:
      Tag: hship-2-3
	MockTestCase.java 
Added Files:
      Tag: hship-2-3
	TestRelative.xml 
Log Message:
Fix a bug where pages defined in the application spec were not locatable.
Make a slight change to where page specifications are stored under WEB-INF.

--- NEW FILE: TestRelative.xml ---
<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: TestRelative.xml,v 1.1.2.1 2002/12/13 12:22:44 hship Exp $ -->

<mock-test>
    <context name="c2" root="context2"/>

  	<servlet name="app" class="net.sf.tapestry.ApplicationServlet">
  		<init-parameter
  			name="net.sf.tapestry.application-specification"
  			value="/net/sf/tapestry/junit/mock/c2/C2.application"/>
  	</servlet>      
    
<!-- Check that the home service is the default service. -->
    
    <request>   
    	<parameter name="service" value="page"/>
    	<parameter name="context" value="Relative"/>
    				
		<assert-output name="Title">
<![CDATA[
<title>Relative Page</title>
]]>
		</assert-output>		

		<assert-output name="Text from page">
This page's specification is located relative to the application specification.
		</assert-output>
		
	</request>	
							 	 	 
</mock-test>
    	

Index: MockTestCase.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/junit/src/net/sf/tapestry/junit/mock/MockTestCase.java,v
retrieving revision 1.10.2.8
retrieving revision 1.10.2.9
diff -C2 -d -r1.10.2.8 -r1.10.2.9
*** MockTestCase.java	12 Dec 2002 12:42:38 -0000	1.10.2.8
--- MockTestCase.java	13 Dec 2002 12:22:44 -0000	1.10.2.9
***************
*** 43,46 ****
--- 43,60 ----
      
      /**
+      *  Test that relative specification paths in the application specification
+      *  work.
+      * 
+      **/
+     
+     public void testRelative() throws Exception
+     {
+         // Note, this needs to be expanded to include relative
+         // paths to components and libraries.
+         
+         attempt("TestRelative.xml");
+     }    
+     
+     /**
       *  Test the reset service.
       *



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.