public void SubmitQueryMatchesRawTest() { Submit submit = new Submit(); submit.AddValue("name", "McDenny’s"); submit.AddValue("address", "1 Main St."); submit.AddValue("locality", "Bedrock"); submit.AddValue("region", "BC"); //Assert Assert.AreEqual("values={\"name\":\"McDenny’s\",\"address\":\"1 Main St.\",\"locality\":\"Bedrock\",\"region\":\"BC\"}", HttpUtility.UrlDecode(submit.ToUrlQuery())); }
public void SubmitAddTestCase2() { //Arrange Submit values = new Submit(); values.AddValue("name", "Starbucks"); values.AddValue("address", "72 Spring St"); values.AddValue("locality", "New York"); values.AddValue("region", "NY"); values.AddValue("postcode", "10012"); values.AddValue("country", "US"); //Act Metadata metadata = new Metadata().User("test_driver_user"); var response = Factual.Submit("us-sandbox", values, metadata); //Assert AssertReceivedOkResponse(response); }
public void SubmitQueryMatchesRawTest() { Submit submit = new Submit(); submit.AddValue("name", "McDenny’s"); submit.AddValue("address", "1 Main St."); submit.AddValue("locality", "Bedrock"); submit.AddValue("region", "BC"); //Assert Assert.AreEqual("values={\"name\":\"McDenny’s\",\"address\":\"1 Main St.\",\"locality\":\"Bedrock\",\"region\":\"BC\"}", HttpUtility.UrlDecode(submit.ToUrlQuery())); }
public void SubmitAddTestCase2() { //Arrange Submit values = new Submit(); values.AddValue("name", "Starbucks"); values.AddValue("address", "72 Spring St"); values.AddValue("locality", "New York"); values.AddValue("region", "NY"); values.AddValue("postcode", "10012"); values.AddValue("country", "US"); //Act Metadata metadata = new Metadata().User("test_driver_user"); var response = Factual.Submit("us-sandbox", values, metadata); //Assert AssertReceivedOkResponse(response); }