Posted on 1/3/2013 9:23:49 PM
in #.NET
Here is an open source tool we developed at Move.
https://github.com/vbodurov/dynamic-proxy-creator
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:
using com.bodurov.DynamicProxy;
...
IMyRequestWrapper request = To.Proxy<IMyRequestWrapper>(Context.Request);
Share this post:
digg
Stumble Upon
del.icio.us
E-mail
|