Re: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Wes Wannemacher
Here is an example - @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"classpath*:applicationContext-test.xml"}) public class SomeActionTest { @Autowired @Qualifier("dao") private MyAction myAction; public void testOne() { ... The difference betw

Re: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Wes Wannemacher
I'm pretty much with Nils here, except that I use later versions of JUnit that support the @RunWith annotation and there is a spring class that you can use so that you can specify an applicationContext.xml file. That way, I can create a spring config file with beans defined specifically for testing

RE: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Martin Gainty
pter aucune responsabilité pour le contenu fourni. > Date: Fri, 11 Sep 2009 13:19:36 +0200 > Subject: Re: Testing with Spring + Struts 2 + TestNG > From: nil...@gmail.com > To: user@struts.apache.org > > If it's unit testing you want to do, can't you just test your

Re: Testing with Spring + Struts 2 + TestNG

2009-09-11 Thread Nils-Helge Garli Hegvik
If it's unit testing you want to do, can't you just test your actions without involving Spring or anything else? I usually just create a unit test where I instantiate my action, set the aproriate dependencies, and then just call the appropriate execute method. Nils-H 2009/9/11 Diego Manilla Suáre