MockHttpServletRequest has null-typed declarations
I'm attempting to use the net.liftweb.mocks.MockHttpServletRequest for some testing and I've run into a problem. Currently, there are some fields like "contentType" which are set as null and do not have an explicit type. This causes problems when I try to redefine the var's to a new value.
Here's an example of the failure:
Could we change the definition of those vars to include the String type?
Here's an example of the failure:
scala> new net.liftweb.mocks.MockHttpServletRequest
res0: net.liftweb.mocks.MockHttpServletRequest = net.liftweb.mocks.MockHttpServletRequest@56426132
scala> res0.contentType = "application/x-www-form-urlencoded"
<console>:5: error: type mismatch;
found : java.lang.String("application/x-www-form-urlencoded")
required: Null
res0.contentType = "application/x-www-form-urlencoded"
^
Could we change the definition of those vars to include the String type?
Leave a comment
(In revision:e9da3b4e2c6b8b0928531fa8bf543b038e0fc9c1) Closes #509. A massive cleanup and bugfix of the HTTP mocks
Branch: master
Branch: master