【发布时间】:2008-11-18 08:13:57
【问题描述】:
我在使用 Rhino Mocks 进行部分模拟时遇到问题:
var authentication = (FormsAuthenticationService)_mocks.PartialMock(
typeof(FormsAuthenticationService));
Expect.Call( delegate{ authentication.SetAuthCookie(null, null); }).IgnoreArguments();
..我在“期望”上得到 NullReferenceException。行..
我将添加 FormsAuthenticationService 实现 IAuthentication
【问题讨论】:
标签: testing rhino-mocks partial-mocks