{"action":"created","comment":{"url":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/comments/32472366","id":32472366,"diff_hunk":"@@ -0,0 +1,217 @@\n+﻿/*\n+Copyright 2015 Google Inc\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+using System;\n+using System.Collections.Generic;\n+using System.IO;\n+using System.Linq;\n+using System.Net.Http;\n+using System.Text;\n+using System.Threading;\n+using System.Threading.Tasks;\n+\n+using Moq;\n+using NUnit.Framework;\n+\n+using Google.Apis.Auth.OAuth2.Requests;\n+using Google.Apis.Auth.OAuth2.Responses;\n+using Google.Apis.Http;\n+using Google.Apis.Json;\n+using Google.Apis.Testing;\n+using Google.Apis.Tests;\n+using Google.Apis.Util;\n+using Google.Apis.Util.Store;\n+\n+namespace Google.Apis.Auth.OAuth2.DefaultCredentials\n+{\n+    /// <summary>Tests for <see cref=\"Google.Apis.Auth.OAuth2.DefaultCredentialProvider\"/>.</summary>\n+    [TestFixture]\n+    public class UserCredentialTests\n+    {\n+        private string CredentialEnvironmentVariable = \"GOOGLE_APPLICATION_CREDENTIALS\";\n+        private string WellKnownCredentialFilePath = Path.Combine(System.Environment.GetEnvironmentVariable(\"APPDATA\"), \"gcloud\", \"application_default_credentials.json\");\n+        private const string DummyUserCredentialFileContents = \"{\\\"client_id\\\": \\\"CLIENT_ID\\\",\\\"client_secret\\\": \\\"CLIENT_SECRET\\\",\\\"refresh_token\\\": \\\"REFRESH_TOKEN\\\",\\\"type\\\": \\\"authorized_user\\\"}\";","path":"Src/GoogleApis.Auth.DotNet4.Tests/OAuth2/DefaultCredentialProvider/DefaultCredentialProviderTests.cs","position":46,"original_position":46,"commit_id":"0360296a76ecf7c2245eeafd46101bc0188b5296","original_commit_id":"0360296a76ecf7c2245eeafd46101bc0188b5296","user":{"login":"peleyal","id":3082873,"avatar_url":"https://avatars.githubusercontent.com/u/3082873?v=3","gravatar_id":"","url":"https://api.github.com/users/peleyal","html_url":"https://github.com/peleyal","followers_url":"https://api.github.com/users/peleyal/followers","following_url":"https://api.github.com/users/peleyal/following{/other_user}","gists_url":"https://api.github.com/users/peleyal/gists{/gist_id}","starred_url":"https://api.github.com/users/peleyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peleyal/subscriptions","organizations_url":"https://api.github.com/users/peleyal/orgs","repos_url":"https://api.github.com/users/peleyal/repos","events_url":"https://api.github.com/users/peleyal/events{/privacy}","received_events_url":"https://api.github.com/users/peleyal/received_events","type":"User","site_admin":false},"body":"Can you please change the style to something like: https://github.com/google/google-api-dotnet-client/blob/master/Src/GoogleApis.Tests/Apis/Requests/BatchRequestTest.cs#L41\r\n\r\nIt will make it more readable and will avoid more than 120 chars per line.","created_at":"2015-06-15T22:04:52Z","updated_at":"2015-06-15T22:04:52Z","html_url":"https://github.com/google/google-api-dotnet-client/pull/551#discussion_r32472366","pull_request_url":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551","_links":{"self":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/comments/32472366"},"html":{"href":"https://github.com/google/google-api-dotnet-client/pull/551#discussion_r32472366"},"pull_request":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551"}}},"pull_request":{"url":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551","id":37739642,"html_url":"https://github.com/google/google-api-dotnet-client/pull/551","diff_url":"https://github.com/google/google-api-dotnet-client/pull/551.diff","patch_url":"https://github.com/google/google-api-dotnet-client/pull/551.patch","issue_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/551","number":551,"state":"open","locked":false,"title":"Application default credentials","user":{"login":"vsubramani","id":10506357,"avatar_url":"https://avatars.githubusercontent.com/u/10506357?v=3","gravatar_id":"","url":"https://api.github.com/users/vsubramani","html_url":"https://github.com/vsubramani","followers_url":"https://api.github.com/users/vsubramani/followers","following_url":"https://api.github.com/users/vsubramani/following{/other_user}","gists_url":"https://api.github.com/users/vsubramani/gists{/gist_id}","starred_url":"https://api.github.com/users/vsubramani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsubramani/subscriptions","organizations_url":"https://api.github.com/users/vsubramani/orgs","repos_url":"https://api.github.com/users/vsubramani/repos","events_url":"https://api.github.com/users/vsubramani/events{/privacy}","received_events_url":"https://api.github.com/users/vsubramani/received_events","type":"User","site_admin":false},"body":"Adding support for Application Default Credentials.","created_at":"2015-06-15T21:52:31Z","updated_at":"2015-06-15T22:04:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82ab5592b19f78070109bdd0a32ad4b91aea0168","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551/commits","review_comments_url":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551/comments","review_comment_url":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/551/comments","statuses_url":"https://api.github.com/repos/google/google-api-dotnet-client/statuses/0360296a76ecf7c2245eeafd46101bc0188b5296","head":{"label":"vsubramani:ApplicationDefaultCredentials","ref":"ApplicationDefaultCredentials","sha":"0360296a76ecf7c2245eeafd46101bc0188b5296","user":{"login":"vsubramani","id":10506357,"avatar_url":"https://avatars.githubusercontent.com/u/10506357?v=3","gravatar_id":"","url":"https://api.github.com/users/vsubramani","html_url":"https://github.com/vsubramani","followers_url":"https://api.github.com/users/vsubramani/followers","following_url":"https://api.github.com/users/vsubramani/following{/other_user}","gists_url":"https://api.github.com/users/vsubramani/gists{/gist_id}","starred_url":"https://api.github.com/users/vsubramani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsubramani/subscriptions","organizations_url":"https://api.github.com/users/vsubramani/orgs","repos_url":"https://api.github.com/users/vsubramani/repos","events_url":"https://api.github.com/users/vsubramani/events{/privacy}","received_events_url":"https://api.github.com/users/vsubramani/received_events","type":"User","site_admin":false},"repo":{"id":35852117,"name":"google-api-dotnet-client","full_name":"vsubramani/google-api-dotnet-client","owner":{"login":"vsubramani","id":10506357,"avatar_url":"https://avatars.githubusercontent.com/u/10506357?v=3","gravatar_id":"","url":"https://api.github.com/users/vsubramani","html_url":"https://github.com/vsubramani","followers_url":"https://api.github.com/users/vsubramani/followers","following_url":"https://api.github.com/users/vsubramani/following{/other_user}","gists_url":"https://api.github.com/users/vsubramani/gists{/gist_id}","starred_url":"https://api.github.com/users/vsubramani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsubramani/subscriptions","organizations_url":"https://api.github.com/users/vsubramani/orgs","repos_url":"https://api.github.com/users/vsubramani/repos","events_url":"https://api.github.com/users/vsubramani/events{/privacy}","received_events_url":"https://api.github.com/users/vsubramani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vsubramani/google-api-dotnet-client","description":"Automatically exported from code.google.com/p/google-api-dotnet-client","fork":true,"url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client","forks_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/forks","keys_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/teams","hooks_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/hooks","issue_events_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/issues/events{/number}","events_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/events","assignees_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/assignees{/user}","branches_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/branches{/branch}","tags_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/tags","blobs_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/statuses/{sha}","languages_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/languages","stargazers_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/stargazers","contributors_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/contributors","subscribers_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/subscribers","subscription_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/subscription","commits_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/contents/{+path}","compare_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/merges","archive_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/downloads","issues_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/issues{/number}","pulls_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/pulls{/number}","milestones_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/milestones{/number}","notifications_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/labels{/name}","releases_url":"https://api.github.com/repos/vsubramani/google-api-dotnet-client/releases{/id}","created_at":"2015-05-19T01:32:10Z","updated_at":"2015-05-19T01:32:11Z","pushed_at":"2015-06-08T21:55:25Z","git_url":"git://github.com/vsubramani/google-api-dotnet-client.git","ssh_url":"git@github.com:vsubramani/google-api-dotnet-client.git","clone_url":"https://github.com/vsubramani/google-api-dotnet-client.git","svn_url":"https://github.com/vsubramani/google-api-dotnet-client","homepage":null,"size":8578,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"e8992a4ed9a5c34af6840ca624143f2e6c394771","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":33947900,"name":"google-api-dotnet-client","full_name":"google/google-api-dotnet-client","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/google-api-dotnet-client","description":"Google APIs Client Library for .NET","fork":false,"url":"https://api.github.com/repos/google/google-api-dotnet-client","forks_url":"https://api.github.com/repos/google/google-api-dotnet-client/forks","keys_url":"https://api.github.com/repos/google/google-api-dotnet-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/google-api-dotnet-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/google-api-dotnet-client/teams","hooks_url":"https://api.github.com/repos/google/google-api-dotnet-client/hooks","issue_events_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/events{/number}","events_url":"https://api.github.com/repos/google/google-api-dotnet-client/events","assignees_url":"https://api.github.com/repos/google/google-api-dotnet-client/assignees{/user}","branches_url":"https://api.github.com/repos/google/google-api-dotnet-client/branches{/branch}","tags_url":"https://api.github.com/repos/google/google-api-dotnet-client/tags","blobs_url":"https://api.github.com/repos/google/google-api-dotnet-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/google-api-dotnet-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/google-api-dotnet-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/google-api-dotnet-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/google-api-dotnet-client/statuses/{sha}","languages_url":"https://api.github.com/repos/google/google-api-dotnet-client/languages","stargazers_url":"https://api.github.com/repos/google/google-api-dotnet-client/stargazers","contributors_url":"https://api.github.com/repos/google/google-api-dotnet-client/contributors","subscribers_url":"https://api.github.com/repos/google/google-api-dotnet-client/subscribers","subscription_url":"https://api.github.com/repos/google/google-api-dotnet-client/subscription","commits_url":"https://api.github.com/repos/google/google-api-dotnet-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/google-api-dotnet-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/google-api-dotnet-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/google-api-dotnet-client/contents/{+path}","compare_url":"https://api.github.com/repos/google/google-api-dotnet-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/google-api-dotnet-client/merges","archive_url":"https://api.github.com/repos/google/google-api-dotnet-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/google-api-dotnet-client/downloads","issues_url":"https://api.github.com/repos/google/google-api-dotnet-client/issues{/number}","pulls_url":"https://api.github.com/repos/google/google-api-dotnet-client/pulls{/number}","milestones_url":"https://api.github.com/repos/google/google-api-dotnet-client/milestones{/number}","notifications_url":"https://api.github.com/repos/google/google-api-dotnet-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/google-api-dotnet-client/labels{/name}","releases_url":"https://api.github.com/repos/google/google-api-dotnet-client/releases{/id}","created_at":"2015-04-14T17:56:22Z","updated_at":"2015-06-15T08:37:24Z","pushed_at":"2015-06-15T21:52:31Z","git_url":"git://github.com/google/google-api-dotnet-client.git","ssh_url":"git@github.com:google/google-api-dotnet-client.git","clone_url":"https://github.com/google/google-api-dotnet-client.git","svn_url":"https://github.com/google/google-api-dotnet-client","homepage":"https://developers.google.com/api-client-library/dotnet","size":9746,"stargazers_count":22,"watchers_count":22,"language":"C#","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":118,"forks":11,"open_issues":118,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551"},"html":{"href":"https://github.com/google/google-api-dotnet-client/pull/551"},"issue":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/issues/551"},"comments":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/issues/551/comments"},"review_comments":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551/comments"},"review_comment":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/pulls/551/commits"},"statuses":{"href":"https://api.github.com/repos/google/google-api-dotnet-client/statuses/0360296a76ecf7c2245eeafd46101bc0188b5296"}}}}