Mark tests using TestCaseSource as failed if an error in the method providing the TestCaseData fails
Currently an NUnit test that uses a TestCaseSource attribute to provide the data will not show up at all if the method providing the TestCaseSource data has an exception.
I often end up resorting to Resharper to run the offending test to find out what is going on.
It would be nice if the tests that are failing because their TestCaseSource is not running can show up as failed tests the same way that they do in Resharper.
Arvis Pinkletter commented
Clearly, what you need to do is write a test on your TestCaseSource method.
(only partially sarcastic)
Seriously though, it would be really nice if TestCaseSource methods showed code coverage and threw setup errors or something on methods that used them
James Nail commented
I do this exact same thing too. It's not just necessarily TestCaseSource though -- any dynamically generated test cases generally suffer from this. In my case I use AutoFixture's autodata attributes feature, and when something is wrong with one of my tests, NCrunch just stops recognizing that test entirely.
Resharper will still run my test and show me any exceptions that were thrown in test setup.