[英]My nunit tests are not being run from Visual Studio 2013 express
在下面的代碼中,未在運行程序中找到測試,我也不知道為什么。 請有人能解釋為什么嗎?
[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不會運行nunit測試,僅運行MSTests。 為了從Visual Studio本地運行nunit測試,請安裝NUnit測試適配器 。 但是不確定該版本是否對速成版有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.