Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?

2010-01-08 Thread nino martinez wael
Guice has a concept of providers, I cant remember if spring has the same. You could in that provider ask what kind of mode wicket were in and then return the appropriate service. Im not sure this is a desired way togo since it will impact performance in production.. However resource filtering in

Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?

2010-01-08 Thread Stijn Maller
I assume you're actually talking about stubbing rather then mocking. Mock frameworks belong more in unit testing then in integration testing. If you are in fact talking about stubs then Ilja is right, just use a different applicationContext to inject the stubbed version of your validation service.

Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?

2010-01-08 Thread Stijn Maller
Hmmm, I seem to have inserted that Hi Liam in entirely wrong place! Hope it doesn't distract you from the content of the message though ;o) 2010/1/8 Stijn Maller stijn.mal...@gmail.com I assume you're actually talking about stubbing rather then mocking. Mock frameworks belong more in unit

Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?

2010-01-08 Thread Kent Tong
it can't be used in system tests. - -- Kent Tong Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net) Books on CXF, Axis2, Wicket, JSF (http://http://agileskills2.org) -- View this message in context: http://old.nabble.com/Wicket-and-Spring---mocking-a-particular-bean

Wicket and Spring - mocking a particular bean when Wicket is in development mode?

2010-01-07 Thread Liam Clarke-Hutchinson
Hi all, This is probably more of a Spring question than a Wicket question, but I'm asking here in the hopes that someone else has done this before. Basically, we have a page that uses the @SpringBean annotation to inject a credit card validation service. At the moment, when we're developing, it's

Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?

2010-01-07 Thread Ilja Pavkovic
Hi, use a different applicationContext.xml that is used for integration testing. (use maven profiles for using different resource path pointing to different applicationContext.xml files). You cannot use WebApplication.getConfigurationType() as you need a preloaded spring configuration before