Cristiano Gavião wrote:
Hi,

I would like to know if it's possible to create a stub for one class inside a step methods managed by jbehave?

Somebody have tried to do this?


I've never tried personally, as I tend to use mocks for unit-level testing and use IoC containers for constructing objects used at integration-level testing. If I need to use a stub in integration tests I typically create one myself without resorting to mocking frameworks.

That said, JBehave Step method are plain-old Java methods so you can create your object instances whichever way you prefer. I would just recommend that you make explicit the construction of the stub expectations via appropriately expressive steps.

Let us know how you get on with this and we can add a page in documentation about it.

Cheers


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to