Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 812
Ed James Avatar asked Jun 09 '10 15:06

Ed James


People also ask

Does ReSharper slow down Visual Studio?

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.

Is dotCover included with ReSharper?

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.

How do I enable dotCover in ReSharper?

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.


1 Answers

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)

like image 107
Grzenio Avatar answered Oct 09 '22 19:10

Grzenio