Announcement Announcement Module
Collapse
No announcement yet.
JUnit test case for controller with request maping having model attribute Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JUnit test case for controller with request maping having model attribute

    Hello,

    I am writing a JUnit test case for one of my controller and my request mapping signature follows:

    @requestMapping(value="/app/request")
    public String getData(Model modal, @ModelAttribute("form") DataForm form, HttpServletRequest req){}

    Now from my JUnit I am not able to pass data for my form, DataFrom.
    From my test method I tried to set to request's Attribute and Parameters; but none worked. I am getting the form as null.

    Please, Any help here?
Working...
X