I have a method in my action wherin I determine the user from the request
like:
user = userManager.getUserByUsername(getRequest().getRemoteUser());

When testing this method, the test fails on the user being null; quite
logical, as there is no request at test time. How should I implement the
test, so he can find a user? I believe I should mock a request, but cant
find the code how to do it.

-- 
View this message in context: 
http://www.nabble.com/how-to-test-action-method-where-user-is-determined-from-request-tp25482465s2369p25482465.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to