{"action":"closed","number":505,"pull_request":{"url":"https://api.github.com/repos/flutter/plugins/pulls/505","id":183268975,"html_url":"https://github.com/flutter/plugins/pull/505","diff_url":"https://github.com/flutter/plugins/pull/505.diff","patch_url":"https://github.com/flutter/plugins/pull/505.patch","issue_url":"https://api.github.com/repos/flutter/plugins/issues/505","number":505,"state":"closed","locked":false,"title":"[Image Picker] - Add contract tests for Android implementation","user":{"login":"roughike","id":13744304,"avatar_url":"https://avatars0.githubusercontent.com/u/13744304?v=4","gravatar_id":"","url":"https://api.github.com/users/roughike","html_url":"https://github.com/roughike","followers_url":"https://api.github.com/users/roughike/followers","following_url":"https://api.github.com/users/roughike/following{/other_user}","gists_url":"https://api.github.com/users/roughike/gists{/gist_id}","starred_url":"https://api.github.com/users/roughike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roughike/subscriptions","organizations_url":"https://api.github.com/users/roughike/orgs","repos_url":"https://api.github.com/users/roughike/repos","events_url":"https://api.github.com/users/roughike/events{/privacy}","received_events_url":"https://api.github.com/users/roughike/received_events","type":"User","site_admin":false},"body":"Another day, another set of tests! This makes sure that the `onMethodCall` method and the `switch` case in it behave as expected.\r\n\r\nFor example, these are the constants for image sources in this plugin:\r\n\r\n```java\r\n  private static final int SOURCE_CAMERA = 0;\r\n  private static final int SOURCE_GALLERY = 1;\r\n```\r\n\r\nIf somebody were to accidentally flip these the other way around:\r\n\r\n```java\r\n  private static final int SOURCE_GALLERY = 0;\r\n  private static final int SOURCE_CAMERA = 1;\r\n```\r\n\r\nThese tests would catch that:\r\n\r\n<img width=\"969\" alt=\"screen shot 2018-04-22 at 2 42 40 pm\" src=\"https://user-images.githubusercontent.com/13744304/39094639-724cb868-463b-11e8-9a62-55ae163b3021.png\">\r\n\r\nI'll try to come up with a clean way of testing the `registerWith` method in a separate PR.","created_at":"2018-04-22T11:45:02Z","updated_at":"2018-04-23T07:44:28Z","closed_at":"2018-04-23T07:44:28Z","merged_at":"2018-04-23T07:44:28Z","merge_commit_sha":"ec3b0071d2975673c83b3d6ba3c25acf4f3acb39","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":616170846,"url":"https://api.github.com/repos/flutter/plugins/labels/cla:%20yes","name":"cla: yes","color":"FFFFFF","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/flutter/plugins/pulls/505/commits","review_comments_url":"https://api.github.com/repos/flutter/plugins/pulls/505/comments","review_comment_url":"https://api.github.com/repos/flutter/plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/plugins/issues/505/comments","statuses_url":"https://api.github.com/repos/flutter/plugins/statuses/947cb32af1fce6821ef5463e80abd44b7eda8200","head":{"label":"roughike:add-contract-tests-for-android","ref":"add-contract-tests-for-android","sha":"947cb32af1fce6821ef5463e80abd44b7eda8200","user":{"login":"roughike","id":13744304,"avatar_url":"https://avatars0.githubusercontent.com/u/13744304?v=4","gravatar_id":"","url":"https://api.github.com/users/roughike","html_url":"https://github.com/roughike","followers_url":"https://api.github.com/users/roughike/followers","following_url":"https://api.github.com/users/roughike/following{/other_user}","gists_url":"https://api.github.com/users/roughike/gists{/gist_id}","starred_url":"https://api.github.com/users/roughike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roughike/subscriptions","organizations_url":"https://api.github.com/users/roughike/orgs","repos_url":"https://api.github.com/users/roughike/repos","events_url":"https://api.github.com/users/roughike/events{/privacy}","received_events_url":"https://api.github.com/users/roughike/received_events","type":"User","site_admin":false},"repo":{"id":130558530,"name":"plugins","full_name":"roughike/plugins","owner":{"login":"roughike","id":13744304,"avatar_url":"https://avatars0.githubusercontent.com/u/13744304?v=4","gravatar_id":"","url":"https://api.github.com/users/roughike","html_url":"https://github.com/roughike","followers_url":"https://api.github.com/users/roughike/followers","following_url":"https://api.github.com/users/roughike/following{/other_user}","gists_url":"https://api.github.com/users/roughike/gists{/gist_id}","starred_url":"https://api.github.com/users/roughike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roughike/subscriptions","organizations_url":"https://api.github.com/users/roughike/orgs","repos_url":"https://api.github.com/users/roughike/repos","events_url":"https://api.github.com/users/roughike/events{/privacy}","received_events_url":"https://api.github.com/users/roughike/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/roughike/plugins","description":"Plugins for Flutter, including FlutterFire, maintained by the Flutter team","fork":true,"url":"https://api.github.com/repos/roughike/plugins","forks_url":"https://api.github.com/repos/roughike/plugins/forks","keys_url":"https://api.github.com/repos/roughike/plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roughike/plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roughike/plugins/teams","hooks_url":"https://api.github.com/repos/roughike/plugins/hooks","issue_events_url":"https://api.github.com/repos/roughike/plugins/issues/events{/number}","events_url":"https://api.github.com/repos/roughike/plugins/events","assignees_url":"https://api.github.com/repos/roughike/plugins/assignees{/user}","branches_url":"https://api.github.com/repos/roughike/plugins/branches{/branch}","tags_url":"https://api.github.com/repos/roughike/plugins/tags","blobs_url":"https://api.github.com/repos/roughike/plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roughike/plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roughike/plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/roughike/plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roughike/plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/roughike/plugins/languages","stargazers_url":"https://api.github.com/repos/roughike/plugins/stargazers","contributors_url":"https://api.github.com/repos/roughike/plugins/contributors","subscribers_url":"https://api.github.com/repos/roughike/plugins/subscribers","subscription_url":"https://api.github.com/repos/roughike/plugins/subscription","commits_url":"https://api.github.com/repos/roughike/plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/roughike/plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/roughike/plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/roughike/plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/roughike/plugins/contents/{+path}","compare_url":"https://api.github.com/repos/roughike/plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roughike/plugins/merges","archive_url":"https://api.github.com/repos/roughike/plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roughike/plugins/downloads","issues_url":"https://api.github.com/repos/roughike/plugins/issues{/number}","pulls_url":"https://api.github.com/repos/roughike/plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/roughike/plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/roughike/plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roughike/plugins/labels{/name}","releases_url":"https://api.github.com/repos/roughike/plugins/releases{/id}","deployments_url":"https://api.github.com/repos/roughike/plugins/deployments","created_at":"2018-04-22T10:49:20Z","updated_at":"2018-04-23T02:49:55Z","pushed_at":"2018-04-23T06:53:22Z","git_url":"git://github.com/roughike/plugins.git","ssh_url":"git@github.com:roughike/plugins.git","clone_url":"https://github.com/roughike/plugins.git","svn_url":"https://github.com/roughike/plugins","homepage":"https://flutter.io/","size":9895,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flutter:master","ref":"master","sha":"6b5a6c349e2201ceeb3bccece2e33a779f7d9e37","user":{"login":"flutter","id":14101776,"avatar_url":"https://avatars3.githubusercontent.com/u/14101776?v=4","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"repo":{"id":88650014,"name":"plugins","full_name":"flutter/plugins","owner":{"login":"flutter","id":14101776,"avatar_url":"https://avatars3.githubusercontent.com/u/14101776?v=4","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flutter/plugins","description":"Plugins for Flutter, including FlutterFire, maintained by the Flutter team","fork":false,"url":"https://api.github.com/repos/flutter/plugins","forks_url":"https://api.github.com/repos/flutter/plugins/forks","keys_url":"https://api.github.com/repos/flutter/plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flutter/plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flutter/plugins/teams","hooks_url":"https://api.github.com/repos/flutter/plugins/hooks","issue_events_url":"https://api.github.com/repos/flutter/plugins/issues/events{/number}","events_url":"https://api.github.com/repos/flutter/plugins/events","assignees_url":"https://api.github.com/repos/flutter/plugins/assignees{/user}","branches_url":"https://api.github.com/repos/flutter/plugins/branches{/branch}","tags_url":"https://api.github.com/repos/flutter/plugins/tags","blobs_url":"https://api.github.com/repos/flutter/plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flutter/plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flutter/plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/flutter/plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flutter/plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/flutter/plugins/languages","stargazers_url":"https://api.github.com/repos/flutter/plugins/stargazers","contributors_url":"https://api.github.com/repos/flutter/plugins/contributors","subscribers_url":"https://api.github.com/repos/flutter/plugins/subscribers","subscription_url":"https://api.github.com/repos/flutter/plugins/subscription","commits_url":"https://api.github.com/repos/flutter/plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/flutter/plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/flutter/plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/flutter/plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/flutter/plugins/contents/{+path}","compare_url":"https://api.github.com/repos/flutter/plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flutter/plugins/merges","archive_url":"https://api.github.com/repos/flutter/plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flutter/plugins/downloads","issues_url":"https://api.github.com/repos/flutter/plugins/issues{/number}","pulls_url":"https://api.github.com/repos/flutter/plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/flutter/plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/flutter/plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flutter/plugins/labels{/name}","releases_url":"https://api.github.com/repos/flutter/plugins/releases{/id}","deployments_url":"https://api.github.com/repos/flutter/plugins/deployments","created_at":"2017-04-18T17:02:37Z","updated_at":"2018-04-23T02:38:10Z","pushed_at":"2018-04-23T07:44:28Z","git_url":"git://github.com/flutter/plugins.git","ssh_url":"git@github.com:flutter/plugins.git","clone_url":"https://github.com/flutter/plugins.git","svn_url":"https://github.com/flutter/plugins","homepage":"https://flutter.io/","size":9886,"stargazers_count":686,"watchers_count":686,"language":"Dart","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":276,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":276,"open_issues":9,"watchers":686,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/plugins/pulls/505"},"html":{"href":"https://github.com/flutter/plugins/pull/505"},"issue":{"href":"https://api.github.com/repos/flutter/plugins/issues/505"},"comments":{"href":"https://api.github.com/repos/flutter/plugins/issues/505/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/plugins/pulls/505/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/plugins/pulls/505/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/plugins/statuses/947cb32af1fce6821ef5463e80abd44b7eda8200"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"mravn-google","id":22935389,"avatar_url":"https://avatars0.githubusercontent.com/u/22935389?v=4","gravatar_id":"","url":"https://api.github.com/users/mravn-google","html_url":"https://github.com/mravn-google","followers_url":"https://api.github.com/users/mravn-google/followers","following_url":"https://api.github.com/users/mravn-google/following{/other_user}","gists_url":"https://api.github.com/users/mravn-google/gists{/gist_id}","starred_url":"https://api.github.com/users/mravn-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mravn-google/subscriptions","organizations_url":"https://api.github.com/users/mravn-google/orgs","repos_url":"https://api.github.com/users/mravn-google/repos","events_url":"https://api.github.com/users/mravn-google/events{/privacy}","received_events_url":"https://api.github.com/users/mravn-google/received_events","type":"User","site_admin":false},"comments":0,"review_comments":3,"maintainer_can_modify":false,"commits":3,"additions":107,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"mravn-google"}}