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>();
}
}
精彩评论