There are some pages in my project which needs to interact with the backend. I have to load the data I would like to display or I have to persist form data. This works as I expect it and Wicket does here a great job.

But how can I test this? For example I would like to test if page DisplayDataPage redirects to an error page if a pageparameter is missing or the data specified by a pageparameter does not exist.

My DisplayDataPage accesses the BackendService by a getBackend() method.

To test my page I don't want to setup the whole infrastructur. Normally I would mock this method and return a mock instance of BackendService. But with WicketTest I have to use classes or to provide a IPageProvider implementation.

So, what is the best practice for a clean and testable separation of frontend and backend logic in Wicket?

Bye,

Oliver


--
Oliver Fischer

M +49 178 7903538
E [email protected]
W http://www.profitbricks.com
J [email protected]


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

Reply via email to