So you want your Spring beans to be injectable in Tapestry pages. RIght? Instead of using @ContextConfiguration and subclassing your test from AbstractTransactionalJUnit4SpringContextTests , you can let Tapestry create the ApplicationContext. There a several posibilities to do that:
1) you can provide contextConfigLocation context parameter in your web.xml 2) alternatively you can create a TestModule in which you contribute an ApplicationContextCustomizer. See here: http://code.google.com/p/tapestrybook/source/browse/trunk/tapestry-spring/src/main/java/de/t5book/services/AppModule.java This test module can be passed as 4th parameter into PageTester's constructor. On Thu, Feb 3, 2011 at 3:04 PM, m...@raibledesigns.com < m...@raibledesigns.com> wrote: > > I'm doing this to solve @Inject in unit tests. If there's a better way to > do > it, I'd love to hear about it. > > > http://source.appfuse.org/browse/appfuse/trunk/web/tapestry/src/test/java/org/appfuse/webapp/pages/BasePageTestCase.java?r=HEAD > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Compiler-error-when-upgrading-from-tapestry-spring-5-0-18-to-5-2-4-tp3368139p3369288.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Best regards, Igor Drobiazko http://tapestry5.de