public void CountOfParametersEquals0() { string path = string.Empty; var parameters = new Dictionary <string, object>(); FacebookUtils.ParseQueryParametersToDictionary(path, parameters); Assert.Equal(0, parameters.Count); }
public void TheCountOfParameterIsEqualToTheCountOfQuerystring() { string urlWithQueryString = "http://graph.facebook.com/me/likes?limit=3&offset=2"; var parameters = new Dictionary <string, object>(); FacebookUtils.ParseQueryParametersToDictionary(urlWithQueryString, parameters); Assert.Equal(2, parameters.Count); }
public void ReturnPathDoesNotStartWithForwardSlash() { string originalPathWithQueryString = "/me/likes?limit=3&offset=2"; var parameters = new Dictionary <string, object>(); var path = FacebookUtils.ParseQueryParametersToDictionary(originalPathWithQueryString, parameters); Assert.NotEqual('/', path[0]); }
public void CountOfParametersEquals2() { string path = "/me/likes?limit=3&offset=2"; var parameters = new Dictionary <string, object>(); FacebookUtils.ParseQueryParametersToDictionary(path, parameters); Assert.Equal(2, parameters.Count); }
public void ReturnPathEqualsThePathWithoutQuerystring() { string originalPath = "/me/likes?limit=3&offset=2"; var parameters = new Dictionary <string, object>(); var path = FacebookUtils.ParseQueryParametersToDictionary(originalPath, parameters); Assert.Equal(path, "me/likes"); }
public void CountOfParameterIs0() { string url = "http://graph.facebook.com/me/likes"; var parameters = new Dictionary <string, object>(); FacebookUtils.ParseQueryParametersToDictionary(url, parameters); Assert.Equal(0, parameters.Count); }
public void ReturnPathDoesNotStartWithForwardSlash() { string url = "http://graph.facebook.com/me/likes"; var parameters = new Dictionary <string, object>(); var path = FacebookUtils.ParseQueryParametersToDictionary(url, parameters); Assert.NotEqual('/', path[0]); }
public void TheParameterValuesAreEqualToTheQuerystrings() { string urlWithQueryString = "http://graph.facebook.com/me/likes?limit=3&offset=2"; var parameters = new Dictionary <string, object>(); FacebookUtils.ParseQueryParametersToDictionary(urlWithQueryString, parameters); Assert.Equal("3", parameters["limit"]); Assert.Equal("2", parameters["offset"]); }
public void TheReturnPathEqualsPathWithoutUriHostAndDoesNotStartWithForwardSlash() { string urlWithQueryString = "http://graph.facebook.com/me/likes?limit=3&offset=2"; string originalPathWithoutForwardSlashAndWithoutQueryString = "me/likes"; var parameters = new Dictionary <string, object>(); var path = FacebookUtils.ParseQueryParametersToDictionary(urlWithQueryString, parameters); Assert.Equal(originalPathWithoutForwardSlashAndWithoutQueryString, path); }
public void ParameterValuesEqualToTheQuerystrings() { string path = "/me/likes?limit=3&offset=2"; var parameters = new Dictionary <string, object>(); FacebookUtils.ParseQueryParametersToDictionary(path, parameters); Assert.Equal("3", parameters["limit"]); Assert.Equal("2", parameters["offset"]); }
public void ReturnPathEqualsPathWithoutUriHostAndDoesntStartWithForwardSlash() { string url = "http://graph.facebook.com/me/likes"; string originalPathWithoutForwardSlash = "me/likes"; var parameters = new Dictionary <string, object>(); var path = FacebookUtils.ParseQueryParametersToDictionary(url, parameters); Assert.Equal(originalPathWithoutForwardSlash, path); }
public void ReturnPathEqualsThePathWithoutForwardSlash() { string originalPath = "/me/likes"; string pathWithoutForwardSlash = "me/likes"; var parameters = new Dictionary <string, object>(); var path = FacebookUtils.ParseQueryParametersToDictionary(originalPath, parameters); Assert.Equal(pathWithoutForwardSlash, path); }