File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring MVC 3.0 Controller Unit testing

 
Nitesh Patel
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am trying to create Junit test case for simple Spring MVC 3.0 controller. I have simple controller as below,


I am trying to create unit test for this controller as below,


But I could not find out how can I create testing object for Model. I can pass null for current test but in future I might need it (not null object). Can someone please guide me ?

Regards,
Nitesh
 
Niall Loughnane
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitesh,

I gather from your question that you are trying to test the data in the ModelMap object that is passed as a parameter into the modelMap in the showMember method?

You can do this by creating an instance of the ModelMap class?

Niall
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic