{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/2","id":34699656,"html_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pull/2","diff_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pull/2.diff","patch_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pull/2.patch","issue_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/2","number":2,"state":"closed","locked":false,"title":"Chapter 3 Using stubs to break dependencies","user":{"login":"thinkAmi","id":1299734,"avatar_url":"https://avatars.githubusercontent.com/u/1299734?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkAmi","html_url":"https://github.com/thinkAmi","followers_url":"https://api.github.com/users/thinkAmi/followers","following_url":"https://api.github.com/users/thinkAmi/following{/other_user}","gists_url":"https://api.github.com/users/thinkAmi/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkAmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkAmi/subscriptions","organizations_url":"https://api.github.com/users/thinkAmi/orgs","repos_url":"https://api.github.com/users/thinkAmi/repos","events_url":"https://api.github.com/users/thinkAmi/events{/privacy}","received_events_url":"https://api.github.com/users/thinkAmi/received_events","type":"User","site_admin":false},"body":"- 位置No.1436 > stub classの名前は `Fake...`として、`Stub...`や`Mock...`は使わない\r\n- 位置No.1497 >  テストのためのコンストラクタ引数が増えたら、invension of control (IoC) container を使うことも検討する\r\n  - Microsoft Unity, StructureMap, Castle Windsor, etc..\r\n  - [List of .NET Dependency Injection Containers (IOC) - Scott Hanselman](http://www.hanselman.com/blog/ListOfNETDependencyInjectionContainersIOC.aspx)\r\n  - [Manning: Dependency Injection in .NET](http://www.manning.com/seemann/)\r\n  - [Amazon.co.jp： Clean Code アジャイルソフトウェア達人の技: Robert C. Martin, 花井 志生: 本](http://www.amazon.co.jp/dp/4048676881)\r\n- 位置No.1525 > ほとんどのケースではコンストラクタ引数で良く、プロパティも時々使われる\r\n- 位置No.1720 > `[InternalVisibleTo]`で、internalなクラスでもテストを可能にする\r\n- 位置No.1720 > `[Conditional]`attribute (`System.Diagnostics.ConditionalAttribute`) も利用可能\r\n- ただし、アトリビュートは可読性を下げたりするので、注意して使う\r\n- 位置No.1737 > `#if DEBUG`も使えるが、乱雑になるので、`[InternalVisibleTo]`の方が望ましい\r\n\r\n","created_at":"2015-05-05T06:51:16Z","updated_at":"2015-05-06T12:14:06Z","closed_at":"2015-05-06T12:14:06Z","merged_at":"2015-05-06T12:14:06Z","merge_commit_sha":"0d44661e6ae3e46113af7455e1648393460df650","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/2/commits","review_comments_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/2/comments","review_comment_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/2/comments","statuses_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/statuses/eea167fad51a79bb629d0e7f41bf24010b4cb707","head":{"label":"thinkAmi-sandbox:Chapter3_Using_stubs_to_break_dependencies","ref":"Chapter3_Using_stubs_to_break_dependencies","sha":"eea167fad51a79bb629d0e7f41bf24010b4cb707","user":{"login":"thinkAmi-sandbox","id":9967100,"avatar_url":"https://avatars.githubusercontent.com/u/9967100?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkAmi-sandbox","html_url":"https://github.com/thinkAmi-sandbox","followers_url":"https://api.github.com/users/thinkAmi-sandbox/followers","following_url":"https://api.github.com/users/thinkAmi-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/thinkAmi-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkAmi-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkAmi-sandbox/subscriptions","organizations_url":"https://api.github.com/users/thinkAmi-sandbox/orgs","repos_url":"https://api.github.com/users/thinkAmi-sandbox/repos","events_url":"https://api.github.com/users/thinkAmi-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/thinkAmi-sandbox/received_events","type":"Organization","site_admin":false},"repo":{"id":34448022,"name":"syakyo_The_Art_of_Unit_Testing_2nd","full_name":"thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","owner":{"login":"thinkAmi-sandbox","id":9967100,"avatar_url":"https://avatars.githubusercontent.com/u/9967100?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkAmi-sandbox","html_url":"https://github.com/thinkAmi-sandbox","followers_url":"https://api.github.com/users/thinkAmi-sandbox/followers","following_url":"https://api.github.com/users/thinkAmi-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/thinkAmi-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkAmi-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkAmi-sandbox/subscriptions","organizations_url":"https://api.github.com/users/thinkAmi-sandbox/orgs","repos_url":"https://api.github.com/users/thinkAmi-sandbox/repos","events_url":"https://api.github.com/users/thinkAmi-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/thinkAmi-sandbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","description":"","fork":false,"url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","forks_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/forks","keys_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/teams","hooks_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/hooks","issue_events_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/events{/number}","events_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/events","assignees_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/assignees{/user}","branches_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/branches{/branch}","tags_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/tags","blobs_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/refs{/sha}","trees_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/statuses/{sha}","languages_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/languages","stargazers_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/stargazers","contributors_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/contributors","subscribers_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/subscribers","subscription_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/subscription","commits_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/commits{/sha}","git_commits_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/commits{/sha}","comments_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/comments{/number}","issue_comment_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/comments{/number}","contents_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/contents/{+path}","compare_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/merges","archive_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/downloads","issues_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues{/number}","pulls_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls{/number}","milestones_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/milestones{/number}","notifications_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/labels{/name}","releases_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/releases{/id}","created_at":"2015-04-23T09:52:43Z","updated_at":"2015-05-05T06:17:13Z","pushed_at":"2015-05-06T12:14:06Z","git_url":"git://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd.git","ssh_url":"git@github.com:thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd.git","clone_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd.git","svn_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","homepage":null,"size":120,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thinkAmi-sandbox:master","ref":"master","sha":"527a77e1120a974a700b9860c7674dba1f011a9f","user":{"login":"thinkAmi-sandbox","id":9967100,"avatar_url":"https://avatars.githubusercontent.com/u/9967100?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkAmi-sandbox","html_url":"https://github.com/thinkAmi-sandbox","followers_url":"https://api.github.com/users/thinkAmi-sandbox/followers","following_url":"https://api.github.com/users/thinkAmi-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/thinkAmi-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkAmi-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkAmi-sandbox/subscriptions","organizations_url":"https://api.github.com/users/thinkAmi-sandbox/orgs","repos_url":"https://api.github.com/users/thinkAmi-sandbox/repos","events_url":"https://api.github.com/users/thinkAmi-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/thinkAmi-sandbox/received_events","type":"Organization","site_admin":false},"repo":{"id":34448022,"name":"syakyo_The_Art_of_Unit_Testing_2nd","full_name":"thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","owner":{"login":"thinkAmi-sandbox","id":9967100,"avatar_url":"https://avatars.githubusercontent.com/u/9967100?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkAmi-sandbox","html_url":"https://github.com/thinkAmi-sandbox","followers_url":"https://api.github.com/users/thinkAmi-sandbox/followers","following_url":"https://api.github.com/users/thinkAmi-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/thinkAmi-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkAmi-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkAmi-sandbox/subscriptions","organizations_url":"https://api.github.com/users/thinkAmi-sandbox/orgs","repos_url":"https://api.github.com/users/thinkAmi-sandbox/repos","events_url":"https://api.github.com/users/thinkAmi-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/thinkAmi-sandbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","description":"","fork":false,"url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","forks_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/forks","keys_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/teams","hooks_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/hooks","issue_events_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/events{/number}","events_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/events","assignees_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/assignees{/user}","branches_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/branches{/branch}","tags_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/tags","blobs_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/refs{/sha}","trees_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/statuses/{sha}","languages_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/languages","stargazers_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/stargazers","contributors_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/contributors","subscribers_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/subscribers","subscription_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/subscription","commits_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/commits{/sha}","git_commits_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/git/commits{/sha}","comments_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/comments{/number}","issue_comment_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/comments{/number}","contents_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/contents/{+path}","compare_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/merges","archive_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/downloads","issues_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues{/number}","pulls_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls{/number}","milestones_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/milestones{/number}","notifications_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/labels{/name}","releases_url":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/releases{/id}","created_at":"2015-04-23T09:52:43Z","updated_at":"2015-05-05T06:17:13Z","pushed_at":"2015-05-06T12:14:06Z","git_url":"git://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd.git","ssh_url":"git@github.com:thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd.git","clone_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd.git","svn_url":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd","homepage":null,"size":120,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/2"},"html":{"href":"https://github.com/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pull/2"},"issue":{"href":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/2"},"comments":{"href":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/thinkAmi-sandbox/syakyo_The_Art_of_Unit_Testing_2nd/statuses/eea167fad51a79bb629d0e7f41bf24010b4cb707"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"thinkAmi","id":1299734,"avatar_url":"https://avatars.githubusercontent.com/u/1299734?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkAmi","html_url":"https://github.com/thinkAmi","followers_url":"https://api.github.com/users/thinkAmi/followers","following_url":"https://api.github.com/users/thinkAmi/following{/other_user}","gists_url":"https://api.github.com/users/thinkAmi/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkAmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkAmi/subscriptions","organizations_url":"https://api.github.com/users/thinkAmi/orgs","repos_url":"https://api.github.com/users/thinkAmi/repos","events_url":"https://api.github.com/users/thinkAmi/events{/privacy}","received_events_url":"https://api.github.com/users/thinkAmi/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":8,"additions":322,"deletions":11,"changed_files":9}}