Results 1 to 2 of 2

Thread: How do I use the Mock Portlet ojbects for testing?

  1. #1
    Join Date
    Jul 2009
    Posts
    6

    Default How do I use the Mock Portlet ojbects for testing?

    Hi All,

    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

    Cheers,
    Troy

  2. #2
    Join Date
    Sep 2004
    Location
    Arizona, USA
    Posts
    383

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •