From: Bill L. <bi...@ji...> - 2003-07-17 02:54:03
|
All, I haven't been able to figure out how to set attributes in a MockHttpServletRequest. I searched the mailing list archives for clues, but didn't find any (and there's no javadocs for that class!). The method that looks like it might work only takes one param: request.setupGetAttribute(Object) I'd expect that to be request.setupGetAttribute(String, Object) I've also tried passing in a vector of name/value pairs to that method, but when I call getAttribute(String) on that request object I get this error: There was 1 failure: 1) testGetAttribute(com.foo.util.MyTest)junit.framework.AssertionFailedError: attributes has run out of objects. at com.mockobjects.ReturnObjectList.nextReturnObject(ReturnObjectList.java:61) at com.mockobjects.servlet.MockHttpServletRequest.getAttribute(MockHttpServletRequest.java:58) Thanks in advance, --Bill |