On 2011.07.19 02:04, Niranjan Rao wrote:
        @Before
        public void setUp() {
                Assert.assertNotNull("Could not get application", theApp);
                tester = new WicketTester(theApp);
                
        }

You need a fresh application instance everytime. In our application for normal execution, app bean is still defined and used through SpringWebApplicationFactory, but in unit tests, we setup tester like this:

        tester = new WicketTester(new App(){
            {
                this.setApplicationContext(ctx);

            }
            @Override
            protected void outputDevelopmentModeWarning() {
                // just get rid of default wicket development message here.

            }
        });



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to