0
votes

Using Resharper Ultimate 10 and NUnit 3 Trying to write some unit tests that have a base class

[TestFixture]
public abstract class BaseTests
{
    protected BaseTests( /*some parameters */)
    {
        // some ctor code
    }

    [SetUp]
    public void Setup()
    {
        // some setup code
    }

    [Test]
    public void Test1()
    {
        // some tests code
    }

    [Test]
    public void Test2()
    {
        // some tests code
    }
}

[TestFixture]
public class TestA : BaseTests
{
    public TestA() : base(/* some parameters */) { }
}

[TestFixture]
public class TestB : BaseTests
{
    public TestB() : base(/* some parameters */) { }
}

My problem is that the unit test runner (resharper) shows those tests inconclusive eventhough none of the tests fail when I debug.

Ideas?

1
Is this working for you now? As of ReSharper 10.0.2 and NUnit 3.0.1, we are still unable to run inherited tests in either VS 2013 or 2015. Curious if you've had better luck than me! - Todd Menier
I actually did succeed in running those tests with RS and VS15 - Eugene Krapivin

1 Answers

2
votes

Nunit 3 RTM isn't supported just yet. The current release of ReSharper 10.0.1 only supports Nunit 3 Beta 5. ReSharper 10.0.2 will have support, it's due in the next few weeks. I don't know if the current EAP has added RTM support yet, but it might be worth giving it a try.