in the web.config.
Nunit tests still failed on the session state action.
Do I have to mock these out?
我不相信您可以在不模拟的情况下从单元测试中访问会话。
看看 Phil Haack 的 HttpSimulatorhttp://haacked.com/archive/2007/06/19/unit-tests-web-code-without-a-web-server-using-httpsimulator.aspx
I don't believe you can access Session from your unit tests without mocking it.
Have a look at Phil Haack's HttpSimulatorhttp://haacked.com/archive/2007/06/19/unit-tests-web-code-without-a-web-server-using-httpsimulator.aspx
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
我不相信您可以在不模拟的情况下从单元测试中访问会话。
看看 Phil Haack 的 HttpSimulator
http://haacked.com/archive/2007/06/19/unit-tests-web-code-without-a-web-server-using-httpsimulator.aspx
I don't believe you can access Session from your unit tests without mocking it.
Have a look at Phil Haack's HttpSimulator
http://haacked.com/archive/2007/06/19/unit-tests-web-code-without-a-web-server-using-httpsimulator.aspx