开发者

RhinoMocks Types

开发者 https://www.devze.com 2023-01-19 18:03 出处:网络
Folks How toExposte RhinoMock Objects as properties I am trying following 开发者_如何学Gocode snippet

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

精彩评论

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