public void MapQuestMapTest() { // mapquest is wierd and always returns some kind of result so not sure this test is valid. MapQuestConfig mqc = new MapQuestConfig() .SetKey(MapQuestKey); MapQuestMap MapQuest = new MapQuestMap(mqc); var Expected = new{ Latitude =30.266899, Longitude = -97.742798 }; IGeoCodeResult Target = new GeoCodeResult(); Target = MapQuest.GetCoordinates("Austin, TX"); Assert.AreEqual(Expected.Latitude, Target.Latitude); Assert.AreEqual(Expected.Longitude, Target.Longitude); }
public void MapQuestMapNoResultsTest() { MapQuestConfig mqc = new MapQuestConfig() .SetKey(MapQuestKey); MapQuestMap MapQuest = new MapQuestMap(mqc); IGeoCodeResult Expected = new GeoCodeResult(); Expected.Latitude = 30.266899; Expected.Longitude = -97.742798; IGeoCodeResult Target = new GeoCodeResult(); Target = MapQuest.GetCoordinates("zdkthqqad,aads,a"); // mapquest seems to always return some result }