Reputation: 35
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
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