public void BuildNearbyURLWithoutArgsTest() { GeoRequestProcessor <Geo> target = new GeoRequestProcessor <Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary <string, string> { { "Type", ((int)GeoType.Nearby).ToString() }, }; string actual = target.BuildURL(parameters); }
public void BuildReverseURLWithoutLatLongTest() { GeoRequestProcessor <Geo> target = new GeoRequestProcessor <Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary <string, string> { { "Type", ((int)GeoType.Reverse).ToString() }, { "Accuracy", "city" }, { "Granularity", "10" }, { "MaxResults", "10" } }; string actual = target.BuildURL(parameters); }
public void BuildNearbyURLTest() { GeoRequestProcessor <Geo> target = new GeoRequestProcessor <Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary <string, string> { { "Type", ((int)GeoType.Nearby).ToString() }, { "IP", "168.143.171.180" }, }; string expected = "https://api.twitter.com/1/geo/nearby_places.json?ip=168.143.171.180"; string actual = target.BuildURL(parameters); Assert.AreEqual(expected, actual); }
public void BuildIDURLTest() { GeoRequestProcessor <Geo> target = new GeoRequestProcessor <Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary <string, string> { { "Type", ((int)GeoType.ID).ToString() }, { "ID", "7695dd2ec2f86f2b" }, }; string expected = "https://api.twitter.com/1/geo/id/7695dd2ec2f86f2b.json"; string actual = target.BuildURL(parameters); Assert.AreEqual(expected, actual); }
public void BuildReverseURLTest() { GeoRequestProcessor <Geo> target = new GeoRequestProcessor <Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary <string, string> { { "Type", ((int)GeoType.Reverse).ToString() }, { "Latitude", "37.78215" }, { "Longitude", "-122.40060" }, { "Accuracy", "city" }, { "Granularity", "10" }, { "MaxResults", "10" } }; string expected = "https://api.twitter.com/1/geo/reverse_geocode.json?lat=37.78215&long=-122.40060&accuracy=city&granularity=10&max_results=10"; string actual; actual = target.BuildURL(parameters); Assert.AreEqual(expected, actual); }
public void BuildReverseURLWithoutLatLongTest() { GeoRequestProcessor<Geo> target = new GeoRequestProcessor<Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary<string, string> { {"Type", ((int) GeoType.Reverse).ToString()}, {"Accuracy", "city" }, {"Granularity", "10" }, {"MaxResults", "10" } }; string actual = target.BuildURL(parameters); }
public void BuildReverseURLTest() { GeoRequestProcessor<Geo> target = new GeoRequestProcessor<Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary<string, string> { {"Type", ((int) GeoType.Reverse).ToString()}, {"Latitude", "37.78215"}, {"Longitude", "-122.40060"}, {"Accuracy", "city" }, {"Granularity", "10" }, {"MaxResults", "10" } }; string expected = "https://api.twitter.com/1/geo/reverse_geocode.json?lat=37.78215&long=-122.40060&accuracy=city&granularity=10&max_results=10"; string actual; actual = target.BuildURL(parameters); Assert.AreEqual(expected, actual); }
public void BuildNearbyURLWithoutArgsTest() { GeoRequestProcessor<Geo> target = new GeoRequestProcessor<Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary<string, string> { {"Type", ((int) GeoType.Nearby).ToString()}, }; string actual = target.BuildURL(parameters); }
public void BuildNearbyURLTest() { GeoRequestProcessor<Geo> target = new GeoRequestProcessor<Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary<string, string> { {"Type", ((int) GeoType.Nearby).ToString()}, {"IP", "168.143.171.180"}, }; string expected = "https://api.twitter.com/1/geo/nearby_places.json?ip=168.143.171.180"; string actual = target.BuildURL(parameters); Assert.AreEqual(expected, actual); }
public void BuildIDURLTest() { GeoRequestProcessor<Geo> target = new GeoRequestProcessor<Geo>() { BaseUrl = "https://api.twitter.com/1/" }; var parameters = new Dictionary<string, string> { {"Type", ((int) GeoType.ID).ToString()}, {"ID", "7695dd2ec2f86f2b"}, }; string expected = "https://api.twitter.com/1/geo/id/7695dd2ec2f86f2b.json"; string actual = target.BuildURL(parameters); Assert.AreEqual(expected, actual); }