Unit test utililities

Making unit tests over legacy code sometimes requires the need to inject some values into a property that is private, like in the example:

class MyClass {
private MyObject myProperty;

I found a nice tool that allows to address this issue in a nice manner.

So what you’d like to do in such a situation would be something like :

MyClass obj = new MyClass();
MyObject myProp = new MyObject();


It's only fair to share...
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn

Leave a Reply