Reputation: 53916
In below question I am I am confused by line : handle = adapter.handle(req, res, vc);
Set @ModelAttribute in MockHttpServletRequest in JUnit Test
How/where is the adapter
object instantiated ?
Upvotes: 0
Views: 219
Reputation: 3624
The adapter object that he is referring to is a HandlerAdapter from the SpringSource docs. More specifically, it is the subclass AnnotationMethodHandlerAdapter
I also wanted to test my RESTful service in Spring MVC. Below are two links that were really helpful to me:
Unit Testing Controllers in Spring MVC
Using HandlerAdapter in integration tests
Upvotes: 3
Reputation: 299148
Both the adapter
and the WebTestExecutionerListener
seem to be the OPs own code. There's no way of knowing short of asking him.
Upvotes: 0