Re: Wicket, Spring 3 and UnitTesting

2010-01-29 Thread Kent Tong
Jochen Mader-2 wrote: Just figured out how to do UnitTesting with Spring 3 and Wicket. An alternative is to use http://wicketpagetest.sourceforge.net. It works fine with Spring 3.0 without changing any of your code. - -- Kent Tong Better way to unit test Wicket pages (http

Re: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread Jochen Mader
Sorry for my late answer. StaticWebApplicationContext doesn't cut it for me. Your example contains a small mistake: Inserting the mock-object won't work as registerSingleton expects to get a Class. As I want to create mock objects with EasyMock there are two approaches (as far as I know). The one

Re: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread mbrictson
as I know). The one I have shown before, involving the creation of the custom ApplicationContextMock or using easy mock inside a testing-spring.xml. CU Jochen -- View this message in context: http://old.nabble.com/Wicket%2C-Spring-3-and-UnitTesting-tp27320784p27358526.html Sent from

Re: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread Jochen Mader
Oh man, you are right. My eyes got a little selective on that line :)

Wicket, Spring 3 and UnitTesting

2010-01-26 Thread Jochen Mader
Just figured out how to do UnitTesting with Spring 3 and Wicket. Spring 3 introduced a check to see if a given context was a WebApplicationContext. That means ApplicationContextMock is not suitable for testing (giving the infamous No WebApplicationContext found: no ContextLoaderListener

Re: Wicket, Spring 3 and UnitTesting

2010-01-26 Thread Martin Grigorov
Please add this to http://cwiki.apache.org/WICKET/spring.html On Tue, 2010-01-26 at 11:48 +0100, Jochen Mader wrote: Just figured out how to do UnitTesting with Spring 3 and Wicket. Spring 3 introduced a check to see if a given context was a WebApplicationContext. That means

Re: Wicket, Spring 3 and UnitTesting

2010-01-26 Thread mbrictson
/StaticWebApplicationContext.html Jochen Mader-2 wrote: Just figured out how to do UnitTesting with Spring 3 and Wicket. Spring 3 introduced a check to see if a given context was a WebApplicationContext. That means ApplicationContextMock is not suitable for testing (giving the infamous No WebApplicationContext