When you use the Creator, you pass in a Map of properties. I believe the map keys are the property names and the values are the values that the Creator will bind to the properties. So, you'd put your mock object into the map with the appropriate property name as the key.
-----Original Message----- From: Rob Dennett [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 1:55 PM To: Tapestry users Subject: RE: Testing pages 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 > > > > -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.5.4/332 - Release Date: 5/4/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.5.4/332 - Release Date: 5/4/2006 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]