コード例 #1
0
 public void GetAirportsTest()
 {
     var target = new LuceneAirportProvider();
     List<SearchItem> actual;
     actual = target.GetAirports();
     Assert.IsNotNull(actual);
 }
コード例 #2
0
 //[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);
 }
コード例 #3
0
 public void LuceneAirportProviderConstructorTest()
 {
     var target = new LuceneAirportProvider();
 }