Hi Stripers,
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.  What I'm trying
to do is take a real action bean, which has various DAOs and fields mocked
up, and then use the approach described in the stripes books to interact
with the bean indirectly via http request and response.  I'd like to
approach some of my tests this way so that I can really isolate the server
side stuff without booting the entire container.

In essence, what I'm trying to do is get an action bean mocked, and then
poke at it via the http inputs and outputs, but without starting the
container.  I figure if I can do this, then when I screw things up, I'll
know whether I've screwed up the server side, or the javascript/jsp side.

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
 roundtrip.getActionBean(MyActionBean.class)

Thanks much folks!
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-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to