{"action":"created","comment":{"url":"https://api.github.com/repos/mockito/mockito/pulls/comments/181089037","pull_request_review_id":111630287,"id":181089037,"diff_hunk":"@@ -0,0 +1,66 @@\n+package org.mockito\n+\n+import org.scalatest.{FlatSpec, Matchers => ScalaTestMatchers}\n+\n+class MockitoSugarTest extends FlatSpec with MockitoSugar with ScalaTestMatchers with ArgumentMatchersSugar {\n+\n+    class Foo {\n+        def bar = \"not mocked\"\n+\n+        def iHaveSomeDefaultArguments(noDefault: String, default: String = \"default value\"): String = s\"$noDefault - $default\"\n+    }\n+\n+    \"mock[T]\" should \"create a valid mock\" in {\n+        val aMock = mock[Foo]\n+\n+        when(aMock.bar) thenReturn \"mocked!\"\n+\n+        aMock.bar shouldBe \"mocked!\"\n+    }\n+\n+    \"mock[T]\" should \"pre-configure the mock so it works with default arguments\" in {\n+        val aMock = mock[Foo]\n+\n+        aMock.iHaveSomeDefaultArguments(\"I'm not gonna pass the second argument\")\n+        aMock.iHaveSomeDefaultArguments(\"I'm gonna pass the second argument\", \"second argument\")\n+\n+        verify(aMock).iHaveSomeDefaultArguments(\"I'm not gonna pass the second argument\", \"default value\")\n+        verify(aMock).iHaveSomeDefaultArguments(\"I'm gonna pass the second argument\", \"second argument\")\n+    }\n+\n+    \"reset[T]\" should \"reset the mock and re-configure the mock so it works with default arguments\" in {\n+        val aMock = mock[Foo]\n+\n+        reset(aMock)\n+\n+        aMock.iHaveSomeDefaultArguments(\"I'm not gonna pass the second argument\")\n+\n+        verify(aMock).iHaveSomeDefaultArguments(\"I'm not gonna pass the second argument\", \"default value\")\n+    }\n+\n+    \"verifyNoMoreInteractions\" should \"ignore the calls to the methods that provide default arguments\" in {\n+        val aMock = mock[Foo]\n+\n+        reset(aMock)","path":"subprojects/mockito-scala/src/test/scala/org/mockito/MockitoSugarTest.scala","position":44,"original_position":44,"commit_id":"f0d9331bd93873c6859be0f26027f38badaf0b4a","original_commit_id":"f0d9331bd93873c6859be0f26027f38badaf0b4a","user":{"login":"tpalanga","id":665492,"avatar_url":"https://avatars1.githubusercontent.com/u/665492?v=4","gravatar_id":"","url":"https://api.github.com/users/tpalanga","html_url":"https://github.com/tpalanga","followers_url":"https://api.github.com/users/tpalanga/followers","following_url":"https://api.github.com/users/tpalanga/following{/other_user}","gists_url":"https://api.github.com/users/tpalanga/gists{/gist_id}","starred_url":"https://api.github.com/users/tpalanga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpalanga/subscriptions","organizations_url":"https://api.github.com/users/tpalanga/orgs","repos_url":"https://api.github.com/users/tpalanga/repos","events_url":"https://api.github.com/users/tpalanga/events{/privacy}","received_events_url":"https://api.github.com/users/tpalanga/received_events","type":"User","site_admin":false},"body":"No need to reset here","created_at":"2018-04-12T13:53:12Z","updated_at":"2018-04-12T13:53:12Z","html_url":"https://github.com/mockito/mockito/pull/1362#discussion_r181089037","pull_request_url":"https://api.github.com/repos/mockito/mockito/pulls/1362","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mockito/mockito/pulls/comments/181089037"},"html":{"href":"https://github.com/mockito/mockito/pull/1362#discussion_r181089037"},"pull_request":{"href":"https://api.github.com/repos/mockito/mockito/pulls/1362"}}},"pull_request":{"url":"https://api.github.com/repos/mockito/mockito/pulls/1362","id":179994937,"html_url":"https://github.com/mockito/mockito/pull/1362","diff_url":"https://github.com/mockito/mockito/pull/1362.diff","patch_url":"https://github.com/mockito/mockito/pull/1362.patch","issue_url":"https://api.github.com/repos/mockito/mockito/issues/1362","number":1362,"state":"open","locked":false,"title":"Draft of the proposed solution for #1333","user":{"login":"bbonanno","id":241804,"avatar_url":"https://avatars3.githubusercontent.com/u/241804?v=4","gravatar_id":"","url":"https://api.github.com/users/bbonanno","html_url":"https://github.com/bbonanno","followers_url":"https://api.github.com/users/bbonanno/followers","following_url":"https://api.github.com/users/bbonanno/following{/other_user}","gists_url":"https://api.github.com/users/bbonanno/gists{/gist_id}","starred_url":"https://api.github.com/users/bbonanno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbonanno/subscriptions","organizations_url":"https://api.github.com/users/bbonanno/orgs","repos_url":"https://api.github.com/users/bbonanno/repos","events_url":"https://api.github.com/users/bbonanno/events{/privacy}","received_events_url":"https://api.github.com/users/bbonanno/received_events","type":"User","site_admin":false},"body":"[Please do not merge]\r\n\r\nThis PR is just to show the proposed solution to #1333, it needs more work before it's in a state that can be published\r\n","created_at":"2018-04-06T16:24:19Z","updated_at":"2018-04-12T13:53:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb5e8b7ded1648d00eb1115a932833be2f7ab934","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mockito/mockito/pulls/1362/commits","review_comments_url":"https://api.github.com/repos/mockito/mockito/pulls/1362/comments","review_comment_url":"https://api.github.com/repos/mockito/mockito/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mockito/mockito/issues/1362/comments","statuses_url":"https://api.github.com/repos/mockito/mockito/statuses/f0d9331bd93873c6859be0f26027f38badaf0b4a","head":{"label":"bbonanno:mockito-scala","ref":"mockito-scala","sha":"f0d9331bd93873c6859be0f26027f38badaf0b4a","user":{"login":"bbonanno","id":241804,"avatar_url":"https://avatars3.githubusercontent.com/u/241804?v=4","gravatar_id":"","url":"https://api.github.com/users/bbonanno","html_url":"https://github.com/bbonanno","followers_url":"https://api.github.com/users/bbonanno/followers","following_url":"https://api.github.com/users/bbonanno/following{/other_user}","gists_url":"https://api.github.com/users/bbonanno/gists{/gist_id}","starred_url":"https://api.github.com/users/bbonanno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbonanno/subscriptions","organizations_url":"https://api.github.com/users/bbonanno/orgs","repos_url":"https://api.github.com/users/bbonanno/repos","events_url":"https://api.github.com/users/bbonanno/events{/privacy}","received_events_url":"https://api.github.com/users/bbonanno/received_events","type":"User","site_admin":false},"repo":{"id":124923847,"name":"mockito","full_name":"bbonanno/mockito","owner":{"login":"bbonanno","id":241804,"avatar_url":"https://avatars3.githubusercontent.com/u/241804?v=4","gravatar_id":"","url":"https://api.github.com/users/bbonanno","html_url":"https://github.com/bbonanno","followers_url":"https://api.github.com/users/bbonanno/followers","following_url":"https://api.github.com/users/bbonanno/following{/other_user}","gists_url":"https://api.github.com/users/bbonanno/gists{/gist_id}","starred_url":"https://api.github.com/users/bbonanno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbonanno/subscriptions","organizations_url":"https://api.github.com/users/bbonanno/orgs","repos_url":"https://api.github.com/users/bbonanno/repos","events_url":"https://api.github.com/users/bbonanno/events{/privacy}","received_events_url":"https://api.github.com/users/bbonanno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bbonanno/mockito","description":"Most popular Mocking framework for unit tests written in Java","fork":true,"url":"https://api.github.com/repos/bbonanno/mockito","forks_url":"https://api.github.com/repos/bbonanno/mockito/forks","keys_url":"https://api.github.com/repos/bbonanno/mockito/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbonanno/mockito/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbonanno/mockito/teams","hooks_url":"https://api.github.com/repos/bbonanno/mockito/hooks","issue_events_url":"https://api.github.com/repos/bbonanno/mockito/issues/events{/number}","events_url":"https://api.github.com/repos/bbonanno/mockito/events","assignees_url":"https://api.github.com/repos/bbonanno/mockito/assignees{/user}","branches_url":"https://api.github.com/repos/bbonanno/mockito/branches{/branch}","tags_url":"https://api.github.com/repos/bbonanno/mockito/tags","blobs_url":"https://api.github.com/repos/bbonanno/mockito/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbonanno/mockito/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbonanno/mockito/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbonanno/mockito/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbonanno/mockito/statuses/{sha}","languages_url":"https://api.github.com/repos/bbonanno/mockito/languages","stargazers_url":"https://api.github.com/repos/bbonanno/mockito/stargazers","contributors_url":"https://api.github.com/repos/bbonanno/mockito/contributors","subscribers_url":"https://api.github.com/repos/bbonanno/mockito/subscribers","subscription_url":"https://api.github.com/repos/bbonanno/mockito/subscription","commits_url":"https://api.github.com/repos/bbonanno/mockito/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbonanno/mockito/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbonanno/mockito/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbonanno/mockito/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbonanno/mockito/contents/{+path}","compare_url":"https://api.github.com/repos/bbonanno/mockito/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbonanno/mockito/merges","archive_url":"https://api.github.com/repos/bbonanno/mockito/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbonanno/mockito/downloads","issues_url":"https://api.github.com/repos/bbonanno/mockito/issues{/number}","pulls_url":"https://api.github.com/repos/bbonanno/mockito/pulls{/number}","milestones_url":"https://api.github.com/repos/bbonanno/mockito/milestones{/number}","notifications_url":"https://api.github.com/repos/bbonanno/mockito/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbonanno/mockito/labels{/name}","releases_url":"https://api.github.com/repos/bbonanno/mockito/releases{/id}","deployments_url":"https://api.github.com/repos/bbonanno/mockito/deployments","created_at":"2018-03-12T17:10:43Z","updated_at":"2018-03-12T17:10:49Z","pushed_at":"2018-04-09T14:23:29Z","git_url":"git://github.com/bbonanno/mockito.git","ssh_url":"git@github.com:bbonanno/mockito.git","clone_url":"https://github.com/bbonanno/mockito.git","svn_url":"https://github.com/bbonanno/mockito","homepage":"http://mockito.org","size":44410,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"release/2.x"}},"base":{"label":"mockito:release/2.x","ref":"release/2.x","sha":"26a7c62fd53c7d399e155d6d8534bcb9fd79f950","user":{"login":"mockito","id":2054056,"avatar_url":"https://avatars0.githubusercontent.com/u/2054056?v=4","gravatar_id":"","url":"https://api.github.com/users/mockito","html_url":"https://github.com/mockito","followers_url":"https://api.github.com/users/mockito/followers","following_url":"https://api.github.com/users/mockito/following{/other_user}","gists_url":"https://api.github.com/users/mockito/gists{/gist_id}","starred_url":"https://api.github.com/users/mockito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mockito/subscriptions","organizations_url":"https://api.github.com/users/mockito/orgs","repos_url":"https://api.github.com/users/mockito/repos","events_url":"https://api.github.com/users/mockito/events{/privacy}","received_events_url":"https://api.github.com/users/mockito/received_events","type":"Organization","site_admin":false},"repo":{"id":6207167,"name":"mockito","full_name":"mockito/mockito","owner":{"login":"mockito","id":2054056,"avatar_url":"https://avatars0.githubusercontent.com/u/2054056?v=4","gravatar_id":"","url":"https://api.github.com/users/mockito","html_url":"https://github.com/mockito","followers_url":"https://api.github.com/users/mockito/followers","following_url":"https://api.github.com/users/mockito/following{/other_user}","gists_url":"https://api.github.com/users/mockito/gists{/gist_id}","starred_url":"https://api.github.com/users/mockito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mockito/subscriptions","organizations_url":"https://api.github.com/users/mockito/orgs","repos_url":"https://api.github.com/users/mockito/repos","events_url":"https://api.github.com/users/mockito/events{/privacy}","received_events_url":"https://api.github.com/users/mockito/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mockito/mockito","description":"Most popular Mocking framework for unit tests written in Java","fork":false,"url":"https://api.github.com/repos/mockito/mockito","forks_url":"https://api.github.com/repos/mockito/mockito/forks","keys_url":"https://api.github.com/repos/mockito/mockito/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mockito/mockito/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mockito/mockito/teams","hooks_url":"https://api.github.com/repos/mockito/mockito/hooks","issue_events_url":"https://api.github.com/repos/mockito/mockito/issues/events{/number}","events_url":"https://api.github.com/repos/mockito/mockito/events","assignees_url":"https://api.github.com/repos/mockito/mockito/assignees{/user}","branches_url":"https://api.github.com/repos/mockito/mockito/branches{/branch}","tags_url":"https://api.github.com/repos/mockito/mockito/tags","blobs_url":"https://api.github.com/repos/mockito/mockito/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mockito/mockito/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mockito/mockito/git/refs{/sha}","trees_url":"https://api.github.com/repos/mockito/mockito/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mockito/mockito/statuses/{sha}","languages_url":"https://api.github.com/repos/mockito/mockito/languages","stargazers_url":"https://api.github.com/repos/mockito/mockito/stargazers","contributors_url":"https://api.github.com/repos/mockito/mockito/contributors","subscribers_url":"https://api.github.com/repos/mockito/mockito/subscribers","subscription_url":"https://api.github.com/repos/mockito/mockito/subscription","commits_url":"https://api.github.com/repos/mockito/mockito/commits{/sha}","git_commits_url":"https://api.github.com/repos/mockito/mockito/git/commits{/sha}","comments_url":"https://api.github.com/repos/mockito/mockito/comments{/number}","issue_comment_url":"https://api.github.com/repos/mockito/mockito/issues/comments{/number}","contents_url":"https://api.github.com/repos/mockito/mockito/contents/{+path}","compare_url":"https://api.github.com/repos/mockito/mockito/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mockito/mockito/merges","archive_url":"https://api.github.com/repos/mockito/mockito/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mockito/mockito/downloads","issues_url":"https://api.github.com/repos/mockito/mockito/issues{/number}","pulls_url":"https://api.github.com/repos/mockito/mockito/pulls{/number}","milestones_url":"https://api.github.com/repos/mockito/mockito/milestones{/number}","notifications_url":"https://api.github.com/repos/mockito/mockito/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mockito/mockito/labels{/name}","releases_url":"https://api.github.com/repos/mockito/mockito/releases{/id}","deployments_url":"https://api.github.com/repos/mockito/mockito/deployments","created_at":"2012-10-13T20:27:12Z","updated_at":"2018-04-12T12:52:35Z","pushed_at":"2018-04-09T14:23:32Z","git_url":"git://github.com/mockito/mockito.git","ssh_url":"git@github.com:mockito/mockito.git","clone_url":"https://github.com/mockito/mockito.git","svn_url":"https://github.com/mockito/mockito","homepage":"http://mockito.org","size":44406,"stargazers_count":6485,"watchers_count":6485,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1156,"mirror_url":null,"archived":false,"open_issues_count":172,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1156,"open_issues":172,"watchers":6485,"default_branch":"release/2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/mockito/mockito/pulls/1362"},"html":{"href":"https://github.com/mockito/mockito/pull/1362"},"issue":{"href":"https://api.github.com/repos/mockito/mockito/issues/1362"},"comments":{"href":"https://api.github.com/repos/mockito/mockito/issues/1362/comments"},"review_comments":{"href":"https://api.github.com/repos/mockito/mockito/pulls/1362/comments"},"review_comment":{"href":"https://api.github.com/repos/mockito/mockito/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mockito/mockito/pulls/1362/commits"},"statuses":{"href":"https://api.github.com/repos/mockito/mockito/statuses/f0d9331bd93873c6859be0f26027f38badaf0b4a"}},"author_association":"NONE"}}
{"actor":{"display_login":"tpalanga"}}