public void GetLocationsWithCoordsTest() { List <Location> locations = locationPersistence.GetLocations("Loca", 19.0f, -100.0f).ToList(); Assert.AreEqual(2, locations.Count); LocationMatch match1 = (LocationMatch)locations.Find(location => location.Name.Contains("Location1")); LocationMatch match2 = (LocationMatch)locations.Find(location => location.Name.Contains("Location2")); Assert.Greater(match2.Score, match1.Score); }
public IEnumerable <Location> Get(string q, float?latitude, float?longitude) { return(locationPersistence.GetLocations(q, latitude, longitude)); }