我在 Windows 8 Release Preview 上使用 Visual Studio Express 2012,我似乎无法让我的单元测试出现在测试资源管理器中。
我有一个名为 TestApp.Entity 的类和 TestApp.EntityTest ...
这是我的代码:
namespace TestApp.Entity.Test
{
using System;
using System.Net.Http;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestApp.Domain;
[TestClass]
public class EntityTests
{
[TestMethod]
public async void TestObject1Deserialize()
{
Uri agencyUri = new Uri("*removed*");
HttpClient httpClient = new HttpClient();
HttpResponseMessage response = await httpClient.GetAsync(agencyUri);
string responseBodyAsText = await response.Content.ReadAsStringAsync();
List<Agency> agencyList = Deserializers.AgencyDeserialize(responseBodyAsText);
CollectionAssert.Contains(agencyList, new Agency() { Tag = "*removed*", Title = "*removed*", ShortTitle = "", RegionTitle = "*removed*" });
}
}
}
我认为这就是我需要做的所有事情,但它们仍然没有出现在测试资源管理器中。任何意见将是有益的。