[英]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");
}
}
Visual studio won't run nunit tests by default, only MSTests. 默认情况下,Visual Studio不会运行nunit测试,仅运行MSTests。 In order to run nunit tests natively from visual studio, install the NUnit Test Adapter .
为了从Visual Studio本地运行nunit测试,请安装NUnit测试适配器 。 Not sure if it is valid for the express edition though.
但是不确定该版本是否对速成版有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.