开发者

RhinoMocks Types

Folks

How to Exposte RhinoMock Objects as properties

I am trying following 开发者_如何学Gocode snippet

   internal class Mocks
    {
        private MockRepository.GenerateMock<IFormsAuthentication> formsAuthentication;
    }

but its now working for me anyone know How to do this with rhinomocks


MockRepository.GenerateMock<IFormsAuthentication>()

is a method, not a Type.

It looks like what you're looking to do is this:

internal class Mocks    
{
    private IFormsAuthentication formsAuthentication;    

    internal Mocks()
    {
        formsAuthentication = MockRepository.GenerateMock<IFormsAuthentication>();
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜