I am using the Mono and Lokad quality libraries to develop an API which does things like inspect the characteristics of methods to see if they throw exceptions, etc etc.
One of my methods I have in this API looks like this:
// Get all methods which have a NotImplementedException
var throwingMethods = _codebase.Methods
.Where(m => m.GetInstructions()
.Exists(i => i.Creates<NotImplementedException>())
).ToArray();
return throwingMethods;
How could I unit test this? C# does not have its own native ability to do the same thing. Perhaps I could just have a small assembly, make a hard-coded collection, and compare?
Thanks