Re: [appfuse-user] Spring Autowiring during Unit testing

2009-05-15 Thread DUSTIN PEARCE
So I have been trying to get a blog kicked-off this year and this was the lead article, but I haven't found a hosting solution I am happy with. I have my $5 Confluence/Jira licenses and so I think I will deploy them somewhere (cheap I hope). Why is that important? Well the post is all ab

Re: [appfuse-user] Spring Autowiring during Unit testing

2009-05-15 Thread DUSTIN PEARCE
I can help you. When I get home tonight can send you some base test classes that will do what you want. On May 15, 2009, at 2:01 PM, wkbutler wrote: Right, we're using Struts2. I'll investigate further, it would be nice to have the option. I'll post back if I find something useful. Than

Re: [appfuse-user] Spring Autowiring during Unit testing

2009-05-15 Thread wkbutler
Right, we're using Struts2. I'll investigate further, it would be nice to have the option. I'll post back if I find something useful. Thanks Matt - mraible wrote: > > I'm guessing you're using Struts 2? If so, this won't work because in a > normal (web.xml) environment, the filters handle wi

Re: [appfuse-user] Spring Autowiring during Unit testing

2009-05-15 Thread Matt Raible
I'm guessing you're using Struts 2? If so, this won't work because in a normal (web.xml) environment, the filters handle wiring up the dependencies. Hopefully setting the dependencies manually isn't too much of a pain. If it is, I'd suggest talking to the Struts 2 developers and see if there's a wa

Re: [appfuse-user] Spring Autowiring during Unit testing

2009-05-15 Thread wkbutler
Thanks dusty. Yes, you are correct -- test/resources contains a couple Spring configs that came default with AF2 (thanks Matt & group!) and I don't believe I have changed them at all. Sorry, I should have said - I'm testing our Actions, and the beans are declared in standard beans xml files.

Re: [appfuse-user] Spring Autowiring during Unit testing

2009-05-15 Thread DUSTIN PEARCE
Hey kent, Autowiring should work for your unit tests. You likely have a spring configuration file in your test/resources directory. If you are using Spring annotations, you can make sure that they are configured to be scanned in your test applicationContext.xml. There is a base test cla

[appfuse-user] Spring Autowiring during Unit testing

2009-05-14 Thread wkbutler
Hi all - We're using Spring bean autowiring during the regular execution of our app. I believe this is a feature of the ContextLoaderListener which is specified in the web.xml. That works great. In unit testing however, autowiring is not automatically enabled. Our Spring contexts are getting p