Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework
this week in the
Java in General
forum!
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
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Spring
Is there any way to pass httpMocksession from Controller to Delegate using JUNIT Test
Laxmi Prasanna Bn
Greenhorn
Posts: 17
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
While doing spring MVC JUNITtest is there any way to pass httpMocksession
from controller to delegate, if possible please give me some sample example? (session is Autowired in Delegate class)
Bill Gorder
Bartender
Posts: 1682
7
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
@Test public void testMethod throws Exception { req = new MockHttpServletRequest("GET", "/url"); res = new MockHttpServletResponse();
Be sure that spring-test is scoped to
test
and in your
Maven
dependencies.
[
How To Ask Questions
][
Read before you PM me
]
We noticed he had no friends. So we gave him this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Same controller for application client and Browser
struts2 MVC pattern - business logic question
Business Delegate - To which layer does it belong
regarding Delegation
Struts 1.1 Validator Vs Business Rules Validation
More...