Why can't I get 100% code coverage on a method that calls a constructor of a generic type?
- by Martin Watts
Today I came across a wierd issue in a Visual Studio 2008 Code Coverage Analysis.
Consider the following method:
private IController GetController<T>(IContext context) where T : IController, new()
{
IController controller = new T();
controller.ListeningContext = context;
…