public void GetAirportsTest() { var target = new LuceneAirportProvider(); List<SearchItem> actual; actual = target.GetAirports(); Assert.IsNotNull(actual); }
//[TestMethod] public void GetAirportsAndAddToAssetTest() { var target = new LuceneAirportProvider(); List<SearchItem> actual = target.GetAirports(); Assert.IsNotNull(actual); var serializer = new JavaScriptSerializer(); var airports = new List<Airport>(); foreach (SearchItem searchItem in actual) { var airport = new Airport(); airport.id = searchItem.Code; airport.label = searchItem.CityName + ", " + searchItem.CountryCode + " - " + searchItem.Name + " (" + searchItem.Code + ")"; airport.value = searchItem.CityName + " - " + searchItem.Code; airports.Add(airport); } string jsonAirports = serializer.Serialize(airports); File.WriteAllText(@"D:\AllAirports.html", jsonAirports); }
public void LuceneAirportProviderConstructorTest() { var target = new LuceneAirportProvider(); }