Hey, Our application is built on Wicket 1.3.5 , Spring 2.5 and Hibernate 3.2 I'm trying to write tests (with TestNG) for Wicket pages and panels: ++++++++++++++ <filter> <filter-name>WicketFilter</filter-name> <filter-class>org.apache.wicket.protocol.http. WicketFilter</filter-class> <init-param> <param-name>applicationFactoryClassName</param-name> <param-value>org.apache.wicket.spring. SpringWebApplicationFactory</param-value> </init-param> </filter> ++++++++++++++ @Test public void testGroupsPanel() { BulkSentService service = EasyMock.createMock(OurService.class); AnnotApplicationContextMock appctx = new AnnotApplicationContextMock(); appctx.putBean("ourService", service); WicketTester tester = new WicketTester(new OurWicketApplication()); tester.getApplication(). addComponentInstantiationListener( new SpringComponentInjector(tester. getApplication(), appctx)); tester.startPanel(new TestPanelSource() { @Override public Panel getTestPanel(String panelId) { return new GroupsPanel(panelId); } }); } ++++++++++++++ I got this exception: java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? at org.springframework.web.context.support. WebApplicationContextUtils.getRequiredWebApplicationContext( WebApplicationContextUtils.java:70) at org.apache.wicket.spring.injection.annot. SpringComponentInjector.<init>(SpringComponentInjector.java:74)
Any idea what is going wrong? Thanks for help and time. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org