public void IsValidTest() { TwilioRequestValidator target = new TwilioRequestValidator(); // TODO: Initialize to an appropriate value string uri = "https://mycompany.com/myapp.php?foo=1&bar=2"; NameValueCollection post = new NameValueCollection(); post["Digits"] = "1234"; post["To"] = "+18005551212"; post["From"] = "+14158675309"; post["Caller"] = "+14158675309"; post["CallSid"] = "CA1234567890ABCDE"; bool expected = true; bool actual = target.IsValid(uri, "RSOYDt4T1cUTdK1PDd93/VVr8B8=", post); Assert.AreEqual(expected, actual); }
public void IsValidTest() { TwilioRequestValidator target = new TwilioRequestValidator(); // TODO: Initialize to an appropriate value string uri = "https://mycompany.com/myapp.php?foo=1&bar=2"; NameValueCollection post = new NameValueCollection(); post["Digits"] = "1234"; post["To"] = "+18005551212"; post["From"] = "+14158675309"; post["Caller"] = "+14158675309"; post["CallSid"] = "CA1234567890ABCDE"; bool expected = true; bool actual = target.IsValid(uri, "RSOYDt4T1cUTdK1PDd93/VVr8B8=", post); Assert.AreEqual(expected, actual); }