public void SimpleFilterStringValueSerializationTest() { //Arrange var filter = new Filter("search", "Sushi Santa Monica"); //Act var result = JsonConvert.SerializeObject(filter); //Assert Assert.AreEqual("Sushi Santa Monica", result); }
public void MultipleFiltersTest() { // Arrange var filter = new RowFilter("name", "$bw", "Star"); var filter2 = new Filter("include_count", "true"); // Act string result = Factual.Query("t/restaurants-us", filter, filter2); dynamic json = JsonConvert.DeserializeObject(result); // Assert Assert.AreEqual("ok", (string)json.status); }
public void SimpleFilterIntegerValueSerializationTest() { //Arrange var filter = new Filter("limit", 24); //Act var result = JsonConvert.SerializeObject(filter); //Assert Assert.AreEqual("24", result); }