I'm using VS 2010 Professional built-in test cases. I've got a class that has a read-only property that looks something like this:
Private _server As IServer = Nothing
Public ReadOnly Property Server()
Get
If _server Is Nothing Then
RemotingSetup.RegisterHttpBinaryChannel()
_server = RemotingFactory.CreateProxy(Of IServer)(Options.DevLocal)
End If
Return _server
End Get
End Property
In my test cases I want to make a fake server implementation so I can test some of the class methods without actually hitting the server. I've looked around and have seen the InternalsVisibleTo
attribute, but that seems to only allow access to Friend
-level members.
Is there any simple way to get access to these members, aside from declaring them Public/Friend?