Is there any way to get access to a mocked action bean before calling a method on it?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Is there any way to get access to a mocked action bean before calling a method on it?

andrew
Hi Stripes folks,
I'm doing some out-of-container tests, where I setup the internal state of my action bean ahead of time.  In order to use the MockRoundtrip stuff (which is great, btw), it looks like I have to call the execute() method on the roundtrip in order to get back a real action bean instance.

In my case, I sort of already have the action bean all configured, and ideally I'd like to just drop the pre-configured bean into the roundtrip.  Barring that, it'd also be useful to just grab a generated instance once, and then call various setters() on it to setup its state.

As it stands now, it seems like I have to call an execute() method before I get back a real action bean instance.  I can work around it, but I was curious if there were other ways of doing this.

For example:

MockRoundtrip roundtrip = new MockRoundtrip(ctx, MyActionBean.class,session);
 // the following returns a null bean, would be great if it could be real
 roundtrip.getActionBean(MyActionBean.class)

Thanks much!
zim

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users