RE: Unit Testing Advice

2008-11-07 Thread Gundersen, Richard
PROTECTED] Sent: Friday, November 07, 2008 11:08 AM To: Struts Users Mailing List Subject: Re: Unit Testing Advice Is this what you're looking for? http://svn.opensymphony.com/svn/xwork/tags/xwork_2_0_6/ Nils-H On Fri, Nov 7, 2008 at 12:02 PM, Gundersen, Richard <[EMAIL PROTECTED]> w

Re: Unit Testing Advice

2008-11-07 Thread Nils-Helge Garli Hegvik
--- > From: Gundersen, Richard [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 06, 2008 4:34 PM > To: Struts Users Mailing List > Subject: RE: Unit Testing Advice > > Hi > > I just have one smallish question: for some reason my > messages.properties isn't bein

RE: Unit Testing Advice

2008-11-07 Thread Gundersen, Richard
: Gundersen, Richard [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2008 4:34 PM To: Struts Users Mailing List Subject: RE: Unit Testing Advice Hi I just have one smallish question: for some reason my messages.properties isn't being loaded. It's configured in struts.xml ...and I kn

RE: Unit Testing Advice

2008-11-06 Thread Gundersen, Richard
Hi I just have one smallish question: for some reason my messages.properties isn't being loaded. It's configured in struts.xml ...and I know that file is generally working because all the other Struts stuff is working. I'm getting this when my unit test runs (just at the point when it tries to

RE: Unit Testing Advice

2008-11-06 Thread Gundersen, Richard
TED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2008 1:05 PM To: Struts Users Mailing List Subject: Re: Unit Testing Advice The complexity o

Re: Unit Testing Advice

2008-11-06 Thread Nils-Helge Garli Hegvik
The complexity of the test setup often reflects how much of the framework itself you involve in your tests. Usually, I try to avoid mocking the context and http objects by implementing the *Aware interfaces and simply injecting simple Map objects, testing the action in isolation. I realize that thi

RE: Unit Testing Advice

2008-11-06 Thread Gundersen, Richard
This is what I have so far. It works but I would appreciate a little peer review (particularly regarding how I set up my session and the logged in user) Thanks! @Resource private CardPaymentAction cardPaymentAction; ActionContext acti