Hello,

I use some diff. objects in an action bean I want to test (following
http://www.stripesframework.org/display/stripes/Unit+Testing).

I have bean able to test it only by calling the action bean directly:

        bean = new BrikActionBean();        
        bean.setAuthorService(authorService);
        bean.setBrikManager(brikManager);
        bean.editObjectsButton();
        ...

but cannot run it using the MockRoundtrip.
If I use the it, I can't find a way to set the objects.
MockRoundtrip.set/addParameter(...) takes only strings, and I cannot set
objects directly into the action bean, 
nor pass a processed bean into MockRoundtrip e.g.:

    MockRoundtrip trip = new MockRoundtrip(ctx, BrikActionBean.class);
    BrikActionBean bean = trip.getActionBean(BrikActionBean.class);
    bean.setBrikManager(brikManager);
    bean.setAuthorService(authorService);           
    trip.execute("editObjectsButton");

doesn't work.

I have had a hard time trying to use TestNG but dropped it and used
JUnit and extend:
AbstractTransactionalSpringContextTests to set the beans.

Am I getting something wrong?

/Tayeb
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to