Ah ... my book doesn't mention RequestAware at all... useless!! lol

Preseumably the objects I want to get at (the session data primarily) are
then accessible as plain old java, and can be tested using JUnit?

could you give me a pointer to find out more?  

Nick

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 24 October 2008 13:19
To: Struts Users Mailing List
Subject: Re: Unit Testing Action Classes that are "Aware"

Unless you really *need* to bind your actions to Http* types, you should use
RequestAware.  This allows the same end goal indirectly through a Map.

Scott

On Fri, Oct 24, 2008 at 7:10 AM, Nick Maunder | Oathouse
<[EMAIL PROTECTED]>wrote:

> Hi
>
>
>
> I'm fairly new to Struts 2
>
>
>
> I'm looking for a way of unit testing Struts 2 action classes which are
> (for
> example) ServletRequestAware.
>
>
>
> Cactus (the old way I did it) does not appear suitable (or is it and I'm
> missing something?) and HttpUnit does not seem to do the job either.  I
can
> test all of the parts of the class which are not aware using JUnit, but I
> really want to test the methods that are using the HttpServletRequest.
> Ideas would be gratefully accepted.
>
>
>
> Cheers
>
>
>
> Nick
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to