Is there any way to get access to a mocked action bean before calling a method on it?
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.
MockRoundtrip roundtrip = new MockRoundtrip(ctx, MyActionBean.class,session);
// the following returns a null bean, would be great if it could be real