public void GetFilterSerializationTest() { // Arrange var filter = new GeoFilter(34.06021, -118.41828,5000); // Act var result = JsonConvert.SerializeObject(filter); // Assert Assert.AreEqual("{\"$circle\":{\"$center\":[34.06021,-118.41828],\"$meters\":5000}}", result); }
public void GeoAndRowFilterTest() { // Arrange var filter = new RowFilter("name", "Stand"); var filter2 = new GeoFilter(34.06018, -118.41835, 5000); // Act string result = Factual.Query("t/restaurants-us", filter, filter2); dynamic json = JsonConvert.DeserializeObject(result); // Assert Assert.AreEqual("ok", (string)json.status); }
public void QueryWithGeoFilter() { // Arrange var filter = new GeoFilter(34.06018, -118.41835, 500); // Act string result = Factual.Query("t/global", filter); dynamic json = JsonConvert.DeserializeObject(result); // Assert Assert.AreEqual("ok", (string)json.status); }