Sascha
Sascha

Reputation: 601

Replacements for private accessors in Visual Studio 2012

I startet to migrate a Testproject from VS2010 to 2012. Now I see that the private accessors are not supported anymore.

I saw this , but is that the only way to fix that? I don't want to declare the private methods as internal... :-(

Upvotes: 2

Views: 6765

Answers (2)

Stefan
Stefan

Reputation: 87

Hiding the usage of PrivateObject by a generic base class like shown by the posting Home-made Private Accessor for Visual Studio 2012+ might ease and simplify its usage.

Regards,

Stefan

Upvotes: 0

Nelson Menezes
Nelson Menezes

Reputation: 109

I guess that in your case using using PrivateObjects will help you. To view how to use them, you can view this link: http://akurniaga.wordpress.com/tag/unit-test-privateobject-visual-studio/ . Hope this helps you.

Upvotes: 1

Related Questions