Utilizzo Visual Studio Express 2012 in Windows 8 Release Preview e non riesco a visualizzare i test dell'unità nell'esploratore di test.Test di unità non visualizzati
ho una classe chiamata TestApp.Entity e TestApp.EntityTest ...
Ecco il mio codice:
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*" });
}
}
}
Suppongo che è tutto quello che dovevo fare, ma ancora don' t appaiono nell'esploratore di prova. Qualsiasi consiglio sarebbe utile.
Windows 8 RTM è fuori. E devi fare in modo che la tua unità esegua 'async Task' invece di 'async void' perché possano funzionare correttamente. –