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:[EMAIL PROTECTED] >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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]