• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring MVC 3.0 Controller Unit testing

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic