Oct 12th, 2009, 12:17 AM
How do I use the Mock Portlet ojbects for testing?
I am struggling to find documentation that talks about how to use the
org.springframework.mock.web.portlet.* package to test my portlet mvc controllers?
Can anyone point me to some documentation that discusses this package?
I am using Spring 2.5 and JUnit 4.4
Oct 23rd, 2009, 03:22 PM
It's really no different than testing normal web controllers. For the methods you've specd in your controllers that you want to built JUnit tests for, build the mock objects needed by the method signature, and then invoke them. I think there are examples in the petportal sample app in the distribution.