Not in particular. Basically, they all more or less do the same (although sometime with different approaches to mocking): Set up the action context, create a mock invocation and invoke intercept on the interceptor with the mock invocation.
I think this is the smallest and simplest interceptor test: http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/ClearSessionInterceptorTest.java Nils-H On Thu, Sep 11, 2008 at 7:48 AM, Mark <[EMAIL PROTECTED]> wrote: > I had a look at a few in the 2.0.11.1 source tree. I couldn't understand > how they were structured. I haven't looked at the 2.1.3 source tree. Is > there a particular one you would suggest? > > Mark > > On 11/09/2008, at 3:40 PM, Nils-Helge Garli Hegvik wrote: > >> Have you looked at the tests in the source repository? >> >> Nils-H >> >> On Thu, Sep 11, 2008 at 7:31 AM, Mark <[EMAIL PROTECTED]> wrote: >>> >>> Hi all: >>> >>> Does anyone have a working example of unit testing a Struts 2 app? I've >>> been looking around for awhile know and found the following resources. >>> However, I've not been able to get any of them to work. >>> >>> >>> http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/ >>> >>> http://www.soft-gems.net/index.php?option=com_content&task=view&id=47&Itemid=33 >>> http://struts.apache.org/2.0.8/docs/how-can-we-test-actions.html >>> >>> I'm using Struts 2.1.3 and want to test Interceptors and result types, >>> not >>> just the Action POJO's. >>> >>> Any help or resources are greatly appreciated! >>> Mark >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]