{"action":"created","issue":{"url":"https://api.github.com/repos/moq/moq4/issues/251","repository_url":"https://api.github.com/repos/moq/moq4","labels_url":"https://api.github.com/repos/moq/moq4/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/moq/moq4/issues/251/comments","events_url":"https://api.github.com/repos/moq/moq4/issues/251/events","html_url":"https://github.com/moq/moq4/pull/251","id":139554799,"number":251,"title":"Add an helper class to simplify parameter capture","user":{"login":"ocoanet","id":1525572,"avatar_url":"https://avatars.githubusercontent.com/u/1525572?v=3","gravatar_id":"","url":"https://api.github.com/users/ocoanet","html_url":"https://github.com/ocoanet","followers_url":"https://api.github.com/users/ocoanet/followers","following_url":"https://api.github.com/users/ocoanet/following{/other_user}","gists_url":"https://api.github.com/users/ocoanet/gists{/gist_id}","starred_url":"https://api.github.com/users/ocoanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocoanet/subscriptions","organizations_url":"https://api.github.com/users/ocoanet/orgs","repos_url":"https://api.github.com/users/ocoanet/repos","events_url":"https://api.github.com/users/ocoanet/events{/privacy}","received_events_url":"https://api.github.com/users/ocoanet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-09T11:46:50Z","updated_at":"2016-06-21T15:23:21Z","closed_at":"2016-06-21T15:20:14Z","pull_request":{"url":"https://api.github.com/repos/moq/moq4/pulls/251","html_url":"https://github.com/moq/moq4/pull/251","diff_url":"https://github.com/moq/moq4/pull/251.diff","patch_url":"https://github.com/moq/moq4/pull/251.patch"},"body":"It is frequently required to capture a mock parameter to perform complex assertions. Parameter capture is [a regular request from new Moq users](https://www.google.com/#q=moq+capture+argument).\r\n\r\nIt can be done with setups and callbacks, but the syntax can be tricky, especially for methods with many parameters.\r\n\r\nThis helper class simplifies parameter capture:\r\n```cs\r\n// Arrange\r\nvar capture = new MockCapture<string>();\r\nmock.Setup(x => x.DoSomething(capture.CaptureAny()));\r\n\r\n// Act\r\n// ...\r\n\r\n// Assert\r\nAssert.Equal(\"World!\", capture.Last);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/moq/moq4/issues/comments/227475332","html_url":"https://github.com/moq/moq4/pull/251#issuecomment-227475332","issue_url":"https://api.github.com/repos/moq/moq4/issues/251","id":227475332,"user":{"login":"kzu","id":169707,"avatar_url":"https://avatars.githubusercontent.com/u/169707?v=3","gravatar_id":"","url":"https://api.github.com/users/kzu","html_url":"https://github.com/kzu","followers_url":"https://api.github.com/users/kzu/followers","following_url":"https://api.github.com/users/kzu/following{/other_user}","gists_url":"https://api.github.com/users/kzu/gists{/gist_id}","starred_url":"https://api.github.com/users/kzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzu/subscriptions","organizations_url":"https://api.github.com/users/kzu/orgs","repos_url":"https://api.github.com/users/kzu/repos","events_url":"https://api.github.com/users/kzu/events{/privacy}","received_events_url":"https://api.github.com/users/kzu/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T15:23:21Z","updated_at":"2016-06-21T15:23:21Z","body":"btw, are you https://twitter.com/ocoanet?"}}
{"actor":{"display_login":"kzu"}}