1

In a previous version of serviceStack I was able to write a request filter for authorization this filter used res.ReturnAuthRequired() when I could not authorize the user. In the current version of servicestack my unit tests now return a null reference exception because ReturnAuthRequired now calls httpRes.EndServiceStackRequest(false); which then calls EndpointHost.CompleteRequest(); How can I unit test this now that there is a reference to the EndpointHost global variable? Should I not use the extension method?

4

1 回答 1

0

是的,回调需要支持正确完成请求中使用的资源 - 例如,它是Funq 的新请求范围支持所必需的。

无论如何,我在这个提交中添加了一些空检查,以便在单元测试时更友好,这将从下一个 v3.96 版本开始提供。

于 2012-08-28T23:58:14.907 回答