On Dec 13, 2011, at 12:40 PM, Thiago H de Paula Figueiredo [via Tapestry] wrote:
> On Tue, 13 Dec 2011 17:25:13 -0200, [hidden email] > <[hidden email]> wrote: > > > Thanks for the fast response! > > Someone once compared this list to an IRC channel . . . :P > > > Created at https://issues.apache.org/jira/browse/TAP5-1788. > > Thanks! By the way, have you checked Tapestry 5.3? > If I try 5.3, I get a whole new error: Tests in error: testListUsers(org.appfuse.webapp.pages.admin.UserListTest): Context attribute is not of type WebApplicationContext: org.springframework.context.support.GenericApplicationContext@48a77106: startup date [Tue Dec 13 12:49:44 MST 2011]; root of context hierarchy Here's how I'm trying to create a Spring-aware PageTester in my application: @ContextConfiguration(locations = { "classpath:/applicationContext-resources.xml", "classpath:/applicationContext-dao.xml", "classpath:/applicationContext-service.xml", "classpath*:/applicationContext.xml", "/WEB-INF/applicationContext*.xml"}) public abstract class BasePageTestCase extends AbstractTransactionalJUnit4SpringContextTests { protected PageTester tester; protected Document doc; protected Map<String, String> fieldValues; protected final Log log = LogFactory.getLog(getClass()); protected static final String MESSAGES = Constants.BUNDLE_KEY; private int smtpPort = 25250; @Before public void onSetUp() { String appPackage = "org.appfuse.webapp"; String appName = "app"; final MockServletContext servletContext = new MockServletContext(""); servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, applicationContext); servletContext.addInitParameter(SpringConstants.USE_EXTERNAL_SPRING_CONTEXT, "true"); tester = new PageTester(appPackage, appName, "src/main/webapp") { @Override protected ModuleDef[] provideExtraModuleDefs() { return new ModuleDef[]{new SpringModuleDef(servletContext)}; } }; -- View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5072571.html Sent from the Tapestry - User mailing list archive at Nabble.com.