public void GetJsonpCallback_ReturnsFalseForGetRequestWithNoCallback() { var request = new HttpRequestMessage(HttpMethod.Get, "http://example.org/"); var result = JsonpMediaTypeFormatter.GetJsonpCallback(request, "callback"); (result == null).Should().BeTrue(); }
public void IsJsonpRequest_ReturnsTrueForGetRequest() { var request = new HttpRequestMessage(HttpMethod.Get, "http://example.org/?callback=?"); var result = JsonpMediaTypeFormatter.GetJsonpCallback(request, "callback"); (result != null).Should().BeTrue(); (result.Value == "?").Should().BeTrue(); }