You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Moore <tr...@gmail.com> on 2006/10/02 23:01:28 UTC

using hivemind in a test situation... looking for example hivemodule xml files.

Hi there --

I am trying to figure out how to use hivemind in a test situation. I have a
basic problem (and I do mean basic :-)  ) that someone's sample files will
problem easily answer for me. Its been kind of frustrating because the
hivemind documentation says that this a reason to use hivemind -- but then
no example is given!

What I want to do is be able to have test modules be supplied instead of the
'real' modules. So for example, I have module 'A' depend on module 'B'
(using <dependency>).  However, during test time I want to be able to say
that module 'C' should be used instead of module 'B' to satisfy module 'A's
dependency. Is there a way to do this?

Now I also looked at <implementation> with the 'if' attribute but there
doesn't seem to be any way to define a value other than on the command-line.
Ideally I would like the module definition to specify whether or not it
wanted to use the test implementation of a service by setting some value.

Any suggestions or examples?

-Pat

Re: using hivemind in a test situation... looking for example hivemodule xml files.

Posted by Patrick Moore <tr...@gmail.com>.
Thanks ... I think building the registry by hand is the way I should go...

On 10/3/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> You can either build up your registry by hand using the RegistryBuilder
> (do
> not call constructDefaultRegistry) or you can test your service
> implementations outside the registry and plug in the dependencies (perhaps
> using mock objects) by hand.  I usually like to test outside the registry
> if
> at all possible.
>
>
>

RE: using hivemind in a test situation... looking for example hivemodule xml files.

Posted by James Carman <ja...@carmanconsulting.com>.
You can either build up your registry by hand using the RegistryBuilder (do
not call constructDefaultRegistry) or you can test your service
implementations outside the registry and plug in the dependencies (perhaps
using mock objects) by hand.  I usually like to test outside the registry if
at all possible. 

-----Original Message-----
From: Patrick Moore [mailto:transparentpolitics@gmail.com] 
Sent: Monday, October 02, 2006 5:01 PM
To: Tapestry users
Subject: using hivemind in a test situation... looking for example
hivemodule xml files.

Hi there --

I am trying to figure out how to use hivemind in a test situation. I have a
basic problem (and I do mean basic :-)  ) that someone's sample files will
problem easily answer for me. Its been kind of frustrating because the
hivemind documentation says that this a reason to use hivemind -- but then
no example is given!

What I want to do is be able to have test modules be supplied instead of the
'real' modules. So for example, I have module 'A' depend on module 'B'
(using <dependency>).  However, during test time I want to be able to say
that module 'C' should be used instead of module 'B' to satisfy module 'A's
dependency. Is there a way to do this?

Now I also looked at <implementation> with the 'if' attribute but there
doesn't seem to be any way to define a value other than on the command-line.
Ideally I would like the module definition to specify whether or not it
wanted to use the test implementation of a service by setting some value.

Any suggestions or examples?

-Pat



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org