castleproject/Core — pull request #40 by blairconrad (2013-12-14 12:55:45+00:00)
Title: 34 inaccessible type parameters should give better error messsages

Fixes #34 and fixes #39.

I may have overstepped slightly. While working on #34, I noticed that my changes would affect the way open generic type errors were reported, so I included them in the work.
First, I added (quite a few) characterization tests so I could understand how things worked currently. Then I added the code to recurse through the type parameters and report on what couldn't be proxied, and which type was causing the problem. While I was at it, I ended up changing the type thrown from `ProxyGenerator.CheckNotGenericTypeDefinition` to `GeneratorException` (from `ArgumentException`) to match the error coming from `DefaultProxyBuilder`, and because I thought the new information about the type being proxied would remove the ambiguity that the argument name was trying to solve.

Of course, I understand that some of these decisions were not mine to make. If you disagree, I apologize for wasting your time and will quickly emend.