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
Resharper is a great Visual Studio productivity extension but on the other hand it slows down significantly the IDE, especially when working with large solutions.
With JetBrains dotCover (which is also available with the ReSharper Ultimate license), you can easily discover the degree to which the code of your solution is covered with unit tests.
Hitting Ctrl+Alt+K P or choosing ReSharper | Cover | Cover Startup Project in the menu launches our solution's startup project under dotCover control. Alternatively, Ctrl+Alt+K K or ReSharper | Cover | Cover Application... enables us to specify the application to calculate code coverage for.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With