Hi there,
I've been trying to figure out how to unit test pages with @SpringBeans. Say
my LoginPage has a spring injected UserService.class in its submit() method
handling all the (database) related authentication tasks. 

I was of course thinking of using a UserService mock, but how can I get my
Page to use the mock? Should I create setters in addition to the @SpringBean
annotation, then create my class in the unit test's setUp() method and
inject the mock there?

Or should I use a totally different approach? 

Thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/Unit-Testing-Pages-with-%40SpringBeans-tf3699578.html#a10345333
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to