问题
I like using the ReSharper unit test runner, but it doesn't support the TestCase attribute that was added in NUnit 2.5. Is there any hack to get round this?
I can obviously use another test runner, but I like the ReSharper one.
回答1:
I love ReSharper, but it does not yet support [TestCase]. However, take a look at the Gallio plug-in for ReSharper which does.
http://www.gallio.org/
回答2:
Another solution that I use on Resharper version 5 is to use aspects with your tests. I'd love resharper 6 but upgrading isn't an option for me currently.
You can use PostSharp to create an aspect that does something as simple as simple as printing out the arguments list to the console every time the unit test is run. When you runt his with the resharper runner in visual studio, if it fails, it will have print out what the arguments were in the output panel. This way you know which test failed. If you use an aspect you can then re-use this on any test that uses TestCases without having to write your printing statement each time.
来源:https://stackoverflow.com/questions/1479075/resharper-unit-test-runner-testcase