opensubscriber
   Find in this group all groups
 
Unknown more information…

t : tapestry-user@jakarta.apache.org 6 May 2006 • 2:10AM -0400

Re: Testing pages
by Andreas Andreou

REPLY TO AUTHOR
 
REPLY TO GROUP




I would create a mock service using EasyMock, then use tapestry's
Creator to provide me with
a page instance having the specified service in place.
http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/test/Creator.html

Rob Dennett wrote:

>Let's say that the page injects a service which has a routine called getFoo and that this routine calls upon the database for values to return.  Is there a way that I can inject a mock service into my page rather than a the real service?
>
>Thanks for your help,
>Rob
>
>-----Original Message-----
>From: Henri Dupre [mailto:henri.dupre@gmai...]
>Sent: Friday, May 05, 2006 11:38 AM
>To: Tapestry users
>Subject: Re: Testing pages
>
>We implemented all our tests with HtmlUnit. I'm very happy with it. With
>tapestry 4,  there is an id tag rendered with every component, it makes it
>very easy to test stuff with HtmlUnit!
>I'm not sure what do you mean with mock services?
>
>Henri.
>
>
>On 5/5/06, Rob Dennett <rob_dennett@tmit...> wrote:
>  
>
>>Can you test your pages using HtmlUnit with mock services?  I have a
>>service that is drawing data from the database and I would like to fake that
>>for testing purposes, but I can't figure out how to do it.
>>
>>
>>
>>Thanks for your help,
>>
>>Rob
>>
>>
>>
>>
>>    
>>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jaka...
For additional commands, e-mail: tapestry-user-help@jaka...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.