I am trying to write a unit test for a method that uses a .net remoting object.
The remoting object is created by using Activator.GetObject(typeof(myRemotingObje开发者_运维问答ctType), uri);
During runtime, the uri is server ip address of the remoting object.
Since I want to write a unit test, I don't want to initialize any .Net remoting to slowdown the test if possible.
Thanks
I would suggest wrapping it and have the wrapper implement an interface. You can then swap the wrapper with a mock equivalent for testing purposes.
精彩评论