Posted on 1/3/2013 9:23:49 PM
Here is an open source tool we developed at Move.
You can also find it in Nuget repository https://nuget.org/packages/com.bodurov.DynamicProxy/1.0.0
The tool takes an existing object and wraps it in interface able to implement this object. For example if you would like to wrap HttpRequest in an interface that you can later pass to your business objects and mock in your tests.
This is how you would use it:
IMyRequestWrapper request = To.Proxy<IMyRequestWrapper>(Context.Request);
Share this post: