// GET api/values/5 public HttpResponseMessage Get(double lat, double lang) { City ret = _repositoryCity.City(lat, lang); if (ret == null) { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "city not found")); } return(Request.CreateResponse(HttpStatusCode.OK, ret)); }
public void GetCityByNameTest() { /* * { * "country": "AD", * "name": "les Escaldes", * "lat": "42.50729", * "lng": "1.53414" * }, */ Assert.NotNull(_repository.City("les Escaldes")); }