{"action":"created","comment":{"url":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/comments/87789898","pull_request_review_id":8386421,"id":87789898,"diff_hunk":"@@ -15,7 +15,7 @@ public ICallSpecification CreateFrom(ICall call, MatchArgs matchArgs)\n         {\n             var methodInfo = call.GetMethodInfo();\n             var argumentSpecs = call.GetArgumentSpecifications();\n-            var arguments = call.GetArguments();\n+            var arguments = call.GetOriginalArguments();","path":"Source/NSubstitute/Core/CallSpecificationFactory.cs","position":5,"original_position":5,"commit_id":"26994b8ab12426001073dd62c2c8ff8b972c4b9f","original_commit_id":"ea566ae65422ef768f02a7b2d5f6215d6b31a39e","user":{"login":"Zvirja","id":1074182,"avatar_url":"https://avatars.githubusercontent.com/u/1074182?v=3","gravatar_id":"","url":"https://api.github.com/users/Zvirja","html_url":"https://github.com/Zvirja","followers_url":"https://api.github.com/users/Zvirja/followers","following_url":"https://api.github.com/users/Zvirja/following{/other_user}","gists_url":"https://api.github.com/users/Zvirja/gists{/gist_id}","starred_url":"https://api.github.com/users/Zvirja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zvirja/subscriptions","organizations_url":"https://api.github.com/users/Zvirja/orgs","repos_url":"https://api.github.com/users/Zvirja/repos","events_url":"https://api.github.com/users/Zvirja/events{/privacy}","received_events_url":"https://api.github.com/users/Zvirja/received_events","type":"User","site_admin":false},"body":"@alexandrnikitin @dtchepak After I investigated that more, I found that already applied changes are not enough to fully cover this sub-feature. Thank you for pointing me to this direction. If we use original arguments for specification composition, we should also ensure that we take original arguments for matching the calls against the specification. \r\n\r\nTherefore, I was forced to add [this commit](https://github.com/nsubstitute/NSubstitute/pull/259/commits/26994b8ab12426001073dd62c2c8ff8b972c4b9f). Please see the changed tests - all them are failing without the introduced changes.\r\n\r\nSorry Alexandr, now you will need to thing about even more set of changes 😉  But, we definitely need. Current behavior of NSubstitute is weak in that area.\r\n\r\nP.S. I like how this PR evolves and becomes more mature and consistent.","created_at":"2016-11-14T12:18:51Z","updated_at":"2016-11-14T12:18:51Z","html_url":"https://github.com/nsubstitute/NSubstitute/pull/259#discussion_r87789898","pull_request_url":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259","_links":{"self":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/comments/87789898"},"html":{"href":"https://github.com/nsubstitute/NSubstitute/pull/259#discussion_r87789898"},"pull_request":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259"}}},"pull_request":{"url":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259","id":92784323,"html_url":"https://github.com/nsubstitute/NSubstitute/pull/259","diff_url":"https://github.com/nsubstitute/NSubstitute/pull/259.diff","patch_url":"https://github.com/nsubstitute/NSubstitute/pull/259.patch","issue_url":"https://api.github.com/repos/nsubstitute/NSubstitute/issues/259","number":259,"state":"open","locked":false,"title":"Add extensibility point for custom auto providers","user":{"login":"Zvirja","id":1074182,"avatar_url":"https://avatars.githubusercontent.com/u/1074182?v=3","gravatar_id":"","url":"https://api.github.com/users/Zvirja","html_url":"https://github.com/Zvirja","followers_url":"https://api.github.com/users/Zvirja/followers","following_url":"https://api.github.com/users/Zvirja/following{/other_user}","gists_url":"https://api.github.com/users/Zvirja/gists{/gist_id}","starred_url":"https://api.github.com/users/Zvirja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zvirja/subscriptions","organizations_url":"https://api.github.com/users/Zvirja/orgs","repos_url":"https://api.github.com/users/Zvirja/repos","events_url":"https://api.github.com/users/Zvirja/events{/privacy}","received_events_url":"https://api.github.com/users/Zvirja/received_events","type":"User","site_admin":false},"body":"This PR creates extensibility point for external parties to specify custom default values. This is a merge of #156 and #234.\r\n\r\n__Changes overview:__  \r\n1. Added custom handlers call action to `RecordReplay` route. \r\nI haven't created any extension method for this feature. That is because I assume this feature to be used rarely and extension method will pollute the completion menu. Moreover, given that very low-level API is provided, it doesn't seem to be a feature for \"broad masses\" :) Let me know if you have different opinion.\r\n\r\n    For now, API is following: `SubstitutionContext.Current.GetCallRouterFor(source).RegisterCustomCallHandler(factory)`.\r\n\r\n2. Introduced `OriginalArguments` to the `ICall` interface and [use them for specifications](https://github.com/Zvirja/NSubstitute/blob/ea566ae65422ef768f02a7b2d5f6215d6b31a39e/Source/NSubstitute/Core/CallSpecificationFactory.cs#L18). This way if call handler (or user in `When/Do` statement) modify argument values (e.g. for `ref` parameters), that doesn't affect rules. Check the following tests: [test1](https://github.com/nsubstitute/NSubstitute/pull/259/files#diff-b7c0c74c6a3e3aec23408093be9eff74R91), [test2](https://github.com/nsubstitute/NSubstitute/pull/259/files#diff-b7c0c74c6a3e3aec23408093be9eff74R123).\r\n\r\n3. AutoValue feature uses its own cache for known results, rather than register its result globally. Current behavior leads to \"increased priority\" for auto-values, if setup is done after the first invocation. See [this test](https://github.com/nsubstitute/NSubstitute/pull/259/files#diff-b7c0c74c6a3e3aec23408093be9eff74R29) for more details. Also, [see this discussion](https://github.com/nsubstitute/NSubstitute/pull/234#discussion-diff-66973758).","created_at":"2016-11-08T14:10:05Z","updated_at":"2016-11-14T12:18:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8422affff98dae72f4d4590fe0bbb0aaa67e6b2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259/commits","review_comments_url":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259/comments","review_comment_url":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nsubstitute/NSubstitute/issues/259/comments","statuses_url":"https://api.github.com/repos/nsubstitute/NSubstitute/statuses/26994b8ab12426001073dd62c2c8ff8b972c4b9f","head":{"label":"Zvirja:add-extensibility-point-for-custom-auto-providers","ref":"add-extensibility-point-for-custom-auto-providers","sha":"26994b8ab12426001073dd62c2c8ff8b972c4b9f","user":{"login":"Zvirja","id":1074182,"avatar_url":"https://avatars.githubusercontent.com/u/1074182?v=3","gravatar_id":"","url":"https://api.github.com/users/Zvirja","html_url":"https://github.com/Zvirja","followers_url":"https://api.github.com/users/Zvirja/followers","following_url":"https://api.github.com/users/Zvirja/following{/other_user}","gists_url":"https://api.github.com/users/Zvirja/gists{/gist_id}","starred_url":"https://api.github.com/users/Zvirja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zvirja/subscriptions","organizations_url":"https://api.github.com/users/Zvirja/orgs","repos_url":"https://api.github.com/users/Zvirja/repos","events_url":"https://api.github.com/users/Zvirja/events{/privacy}","received_events_url":"https://api.github.com/users/Zvirja/received_events","type":"User","site_admin":false},"repo":{"id":73071003,"name":"NSubstitute","full_name":"Zvirja/NSubstitute","owner":{"login":"Zvirja","id":1074182,"avatar_url":"https://avatars.githubusercontent.com/u/1074182?v=3","gravatar_id":"","url":"https://api.github.com/users/Zvirja","html_url":"https://github.com/Zvirja","followers_url":"https://api.github.com/users/Zvirja/followers","following_url":"https://api.github.com/users/Zvirja/following{/other_user}","gists_url":"https://api.github.com/users/Zvirja/gists{/gist_id}","starred_url":"https://api.github.com/users/Zvirja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zvirja/subscriptions","organizations_url":"https://api.github.com/users/Zvirja/orgs","repos_url":"https://api.github.com/users/Zvirja/repos","events_url":"https://api.github.com/users/Zvirja/events{/privacy}","received_events_url":"https://api.github.com/users/Zvirja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zvirja/NSubstitute","description":"A friendly substitute for .NET mocking frameworks.","fork":true,"url":"https://api.github.com/repos/Zvirja/NSubstitute","forks_url":"https://api.github.com/repos/Zvirja/NSubstitute/forks","keys_url":"https://api.github.com/repos/Zvirja/NSubstitute/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zvirja/NSubstitute/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zvirja/NSubstitute/teams","hooks_url":"https://api.github.com/repos/Zvirja/NSubstitute/hooks","issue_events_url":"https://api.github.com/repos/Zvirja/NSubstitute/issues/events{/number}","events_url":"https://api.github.com/repos/Zvirja/NSubstitute/events","assignees_url":"https://api.github.com/repos/Zvirja/NSubstitute/assignees{/user}","branches_url":"https://api.github.com/repos/Zvirja/NSubstitute/branches{/branch}","tags_url":"https://api.github.com/repos/Zvirja/NSubstitute/tags","blobs_url":"https://api.github.com/repos/Zvirja/NSubstitute/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zvirja/NSubstitute/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zvirja/NSubstitute/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zvirja/NSubstitute/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zvirja/NSubstitute/statuses/{sha}","languages_url":"https://api.github.com/repos/Zvirja/NSubstitute/languages","stargazers_url":"https://api.github.com/repos/Zvirja/NSubstitute/stargazers","contributors_url":"https://api.github.com/repos/Zvirja/NSubstitute/contributors","subscribers_url":"https://api.github.com/repos/Zvirja/NSubstitute/subscribers","subscription_url":"https://api.github.com/repos/Zvirja/NSubstitute/subscription","commits_url":"https://api.github.com/repos/Zvirja/NSubstitute/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zvirja/NSubstitute/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zvirja/NSubstitute/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zvirja/NSubstitute/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zvirja/NSubstitute/contents/{+path}","compare_url":"https://api.github.com/repos/Zvirja/NSubstitute/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zvirja/NSubstitute/merges","archive_url":"https://api.github.com/repos/Zvirja/NSubstitute/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zvirja/NSubstitute/downloads","issues_url":"https://api.github.com/repos/Zvirja/NSubstitute/issues{/number}","pulls_url":"https://api.github.com/repos/Zvirja/NSubstitute/pulls{/number}","milestones_url":"https://api.github.com/repos/Zvirja/NSubstitute/milestones{/number}","notifications_url":"https://api.github.com/repos/Zvirja/NSubstitute/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zvirja/NSubstitute/labels{/name}","releases_url":"https://api.github.com/repos/Zvirja/NSubstitute/releases{/id}","deployments_url":"https://api.github.com/repos/Zvirja/NSubstitute/deployments","created_at":"2016-11-07T11:16:48Z","updated_at":"2016-11-07T11:16:50Z","pushed_at":"2016-11-14T12:09:59Z","git_url":"git://github.com/Zvirja/NSubstitute.git","ssh_url":"git@github.com:Zvirja/NSubstitute.git","clone_url":"https://github.com/Zvirja/NSubstitute.git","svn_url":"https://github.com/Zvirja/NSubstitute","homepage":"http://nsubstitute.github.com","size":79935,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"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":"nsubstitute:master","ref":"master","sha":"10fa6bcce86831d29a6176f40aa9927f628b8368","user":{"login":"nsubstitute","id":143513,"avatar_url":"https://avatars.githubusercontent.com/u/143513?v=3","gravatar_id":"","url":"https://api.github.com/users/nsubstitute","html_url":"https://github.com/nsubstitute","followers_url":"https://api.github.com/users/nsubstitute/followers","following_url":"https://api.github.com/users/nsubstitute/following{/other_user}","gists_url":"https://api.github.com/users/nsubstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/nsubstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsubstitute/subscriptions","organizations_url":"https://api.github.com/users/nsubstitute/orgs","repos_url":"https://api.github.com/users/nsubstitute/repos","events_url":"https://api.github.com/users/nsubstitute/events{/privacy}","received_events_url":"https://api.github.com/users/nsubstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":346893,"name":"NSubstitute","full_name":"nsubstitute/NSubstitute","owner":{"login":"nsubstitute","id":143513,"avatar_url":"https://avatars.githubusercontent.com/u/143513?v=3","gravatar_id":"","url":"https://api.github.com/users/nsubstitute","html_url":"https://github.com/nsubstitute","followers_url":"https://api.github.com/users/nsubstitute/followers","following_url":"https://api.github.com/users/nsubstitute/following{/other_user}","gists_url":"https://api.github.com/users/nsubstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/nsubstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsubstitute/subscriptions","organizations_url":"https://api.github.com/users/nsubstitute/orgs","repos_url":"https://api.github.com/users/nsubstitute/repos","events_url":"https://api.github.com/users/nsubstitute/events{/privacy}","received_events_url":"https://api.github.com/users/nsubstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nsubstitute/NSubstitute","description":"A friendly substitute for .NET mocking frameworks.","fork":false,"url":"https://api.github.com/repos/nsubstitute/NSubstitute","forks_url":"https://api.github.com/repos/nsubstitute/NSubstitute/forks","keys_url":"https://api.github.com/repos/nsubstitute/NSubstitute/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nsubstitute/NSubstitute/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nsubstitute/NSubstitute/teams","hooks_url":"https://api.github.com/repos/nsubstitute/NSubstitute/hooks","issue_events_url":"https://api.github.com/repos/nsubstitute/NSubstitute/issues/events{/number}","events_url":"https://api.github.com/repos/nsubstitute/NSubstitute/events","assignees_url":"https://api.github.com/repos/nsubstitute/NSubstitute/assignees{/user}","branches_url":"https://api.github.com/repos/nsubstitute/NSubstitute/branches{/branch}","tags_url":"https://api.github.com/repos/nsubstitute/NSubstitute/tags","blobs_url":"https://api.github.com/repos/nsubstitute/NSubstitute/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nsubstitute/NSubstitute/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nsubstitute/NSubstitute/git/refs{/sha}","trees_url":"https://api.github.com/repos/nsubstitute/NSubstitute/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nsubstitute/NSubstitute/statuses/{sha}","languages_url":"https://api.github.com/repos/nsubstitute/NSubstitute/languages","stargazers_url":"https://api.github.com/repos/nsubstitute/NSubstitute/stargazers","contributors_url":"https://api.github.com/repos/nsubstitute/NSubstitute/contributors","subscribers_url":"https://api.github.com/repos/nsubstitute/NSubstitute/subscribers","subscription_url":"https://api.github.com/repos/nsubstitute/NSubstitute/subscription","commits_url":"https://api.github.com/repos/nsubstitute/NSubstitute/commits{/sha}","git_commits_url":"https://api.github.com/repos/nsubstitute/NSubstitute/git/commits{/sha}","comments_url":"https://api.github.com/repos/nsubstitute/NSubstitute/comments{/number}","issue_comment_url":"https://api.github.com/repos/nsubstitute/NSubstitute/issues/comments{/number}","contents_url":"https://api.github.com/repos/nsubstitute/NSubstitute/contents/{+path}","compare_url":"https://api.github.com/repos/nsubstitute/NSubstitute/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nsubstitute/NSubstitute/merges","archive_url":"https://api.github.com/repos/nsubstitute/NSubstitute/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nsubstitute/NSubstitute/downloads","issues_url":"https://api.github.com/repos/nsubstitute/NSubstitute/issues{/number}","pulls_url":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls{/number}","milestones_url":"https://api.github.com/repos/nsubstitute/NSubstitute/milestones{/number}","notifications_url":"https://api.github.com/repos/nsubstitute/NSubstitute/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nsubstitute/NSubstitute/labels{/name}","releases_url":"https://api.github.com/repos/nsubstitute/NSubstitute/releases{/id}","deployments_url":"https://api.github.com/repos/nsubstitute/NSubstitute/deployments","created_at":"2009-10-23T05:30:01Z","updated_at":"2016-11-11T11:18:07Z","pushed_at":"2016-11-14T12:10:00Z","git_url":"git://github.com/nsubstitute/NSubstitute.git","ssh_url":"git@github.com:nsubstitute/NSubstitute.git","clone_url":"https://github.com/nsubstitute/NSubstitute.git","svn_url":"https://github.com/nsubstitute/NSubstitute","homepage":"http://nsubstitute.github.com","size":81015,"stargazers_count":710,"watchers_count":710,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":147,"mirror_url":null,"open_issues_count":66,"forks":147,"open_issues":66,"watchers":710,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259"},"html":{"href":"https://github.com/nsubstitute/NSubstitute/pull/259"},"issue":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/issues/259"},"comments":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/nsubstitute/NSubstitute/statuses/26994b8ab12426001073dd62c2c8ff8b972c4b9f"}}}}
{"actor":{"display_login":"Zvirja"}}