user3535184
user3535184

Reputation: 35

My nunit tests are not being run from Visual Studio 2013 express

In the following code, the tests are not being found in the runner, and I don't know why. Please could some one explain why?

[TestFixture]
public class RepositoryTest
{
    [SetUp]
    public void Init()
    {
    }

    [Test]
    public void whenIAskForAllTheLocationsAllTheLocationsAreReturned()
    {
        var repo = new LocationRepository();
        var locations = repo.GetLocationsByName("%");
        Assert.AreEqual(locations.Count(), 8);
        Assert.AreEqual(locations.First().LocationName, "Kipling Road");
    }
}

Upvotes: 1

Views: 399

Answers (1)

Claudio Redi
Claudio Redi

Reputation: 68440

Visual studio won't run nunit tests by default, only MSTests. In order to run nunit tests natively from visual studio, install the NUnit Test Adapter. Not sure if it is valid for the express edition though.

Upvotes: 1

Related Questions