ReSharper no longer runs unit tests
I'm trying to write some unit tests for an app I work on at work (In the vague hope that others might follow suit), and I was originally running these 开发者_开发问答tests using NUnit and the ReSharper plugin.
However, ReSharper will no longer run tests for me for some reason: It simply crosses them out with a red strikeout.
There's no error code I'm afraid, and there's no mention of such behaviour on the JetBrains site.
Has anyone else experienced similar benhaviour?
Cheers, Ed
EDIT
An example of a test, just to show that I'm not just doing them wrong:
using NUnit.Framework;
/// <summary>
/// Test
/// </summary>
[TestFixture]
public class Test
{
[Test]
public void TestOne()
{
Assert.IsTrue(true);
}
}
Not exactly much to go wrong in that example :D
Most probably you incidentally deleted [TestFixture], [Test] attributes, made the test methods private, or the test class private.
Please post some example code if the above is not the case (whole class including class declaration)
I had a similar issue recently. The cause was that some config files which some of the tests required were not being copied to the relevant bin directory. The "copy if new/copy always" property on the file had got reset at some point. I got the same lack of feedback that you are seeing, and couldn't work out the problem until i upgraded resharper from 4.5 to 5. Then it started giving me an error message about one of the files.
Since you're already using v5, this probably won't help you that much!
精彩评论