React to breaking changes in StringValues

This commit is contained in:
Ryan Nowak 2015-10-23 17:00:28 -07:00
parent eb302bf359
commit 1b232a27cb
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ namespace MusicStore.Mocks.Facebook
}
else if (request.RequestUri.AbsoluteUri.StartsWith("https://graph.facebook.com/v2.2/me"))
{
Helpers.ThrowIfConditionFailed(() => queryParameters["appsecret_proof"] != null, "appsecret_proof is null");
Helpers.ThrowIfConditionFailed(() => queryParameters["appsecret_proof"].Count > 0, "appsecret_proof is empty");
if (queryParameters["access_token"] == "ValidAccessToken")
{
response.Content = new StringContent("{\"id\":\"Id\",\"name\":\"AspnetvnextTest AspnetvnextTest\",\"first_name\":\"AspnetvnextTest\",\"last_name\":\"AspnetvnextTest\",\"link\":\"https:\\/\\/www.facebook.com\\/myLink\",\"username\":\"AspnetvnextTest.AspnetvnextTest.7\",\"gender\":\"male\",\"email\":\"AspnetvnextTest\\u0040test.com\",\"timezone\":-7,\"locale\":\"en_US\",\"verified\":true,\"updated_time\":\"2013-08-06T20:38:48+0000\",\"CertValidatorInvoked\":\"ValidAccessToken\"}");

View File

@ -24,7 +24,7 @@ namespace MusicStore.Mocks.Google
{
if (formData["code"] == "ValidCode")
{
if (formData["redirect_uri"] != null && ((string)formData["redirect_uri"]).EndsWith("signin-google") &&
if (formData["redirect_uri"].Count > 0 && ((string)formData["redirect_uri"]).EndsWith("signin-google") &&
formData["client_id"] == "[ClientId]" && formData["client_secret"] == "[ClientSecret]")
{
response.Content = new StringContent("{\"access_token\":\"ValidAccessToken\",\"refresh_token\":\"ValidRefreshToken\",\"token_type\":\"Bearer\",\"expires_in\":\"1200\",\"id_token\":\"Token\"}", Encoding.UTF8, "application/json");

View File

@ -24,7 +24,7 @@ namespace MusicStore.Mocks.MicrosoftAccount
{
if (formData["code"] == "ValidCode")
{
if (formData["redirect_uri"] != null && ((string)formData["redirect_uri"]).EndsWith("signin-microsoft") &&
if (formData["redirect_uri"].Count > 0 && ((string)formData["redirect_uri"]).EndsWith("signin-microsoft") &&
formData["client_id"] == "[ClientId]" && formData["client_secret"] == "[ClientSecret]")
{
response.Content = new StringContent("{\"token_type\":\"bearer\",\"expires_in\":3600,\"scope\":\"wl.basic\",\"access_token\":\"ValidAccessToken\",\"refresh_token\":\"ValidRefreshToken\",\"authentication_token\":\"ValidAuthenticationToken\"}");