Just in case anyone else experiences the same problem this is how I solved it:
TestPrincipal user = new TestPrincipal("tim");
ServletContext context = getActionServlet().getServletContext();
HttpServletRequestSimulator hsrs = new HttpServletRequestSimulator(context);
hsrs.setUserPrincipal(
Hi,
Does anyone know how to code a response to request.getUserPrinciple().getName()?
I've used that call at the start of many of my Actions so that only
relevant content would be displayed, however I'm now trying to run
unit tests I'm getting no where as the User Principle is not in the
request.
2 matches
Mail list logo