InvalidProgramException Running Unit Test (Bug Closed)

Posted by Anthony Trudeau on Geeks with Blogs See other posts from Geeks with Blogs or by Anthony Trudeau
Published on Fri, 28 Jan 2011 13:40:56 GMT Indexed on 2011/01/28 23:27 UTC
Read the original article Hit count: 514

Filed under:

In a previous post I reported an InvalidProgramException that occurs in a certain circumstance with unit tests involving accessors on a private generic method.  It turns out that Bug #635093 reported through Microsoft Connect will not be fixed.

The reason cited is that private accessors have been discontinued.  And why have private accessors been discontinued?  They don't have time is the reason listed in the blog post titled "Generation of Private Accessors (Publicize) and Code Generation for Visual Studio 2010".

In my opinion, it's a piss poor decision to discontinue support for a feature that they're still using within automatically generated unit tests against private classes and methods.  But, I think what is worse is the lack of guidance cited in the aforementioned blog post.  Their advice?  Use the PrivateObject to help, but develop your own framework.

At the end of the day what Microsoft is saying is, "I know you spent a lot of money for this product.  I know that you don't have time to develop a framework to deal with this.  We don't have time and that is all that's important."

© Geeks with Blogs or respective owner