{"action":"created","issue":{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/830","repository_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy","labels_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/830/labels{/name}","comments_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/830/comments","events_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/830/events","html_url":"https://github.com/FakeItEasy/FakeItEasy/issues/830","id":171622500,"number":830,"title":"Make all default return values Dummies, even after Invokes or DoesNothing","user":{"login":"blairconrad","id":3275797,"avatar_url":"https://avatars.githubusercontent.com/u/3275797?v=3","gravatar_id":"","url":"https://api.github.com/users/blairconrad","html_url":"https://github.com/blairconrad","followers_url":"https://api.github.com/users/blairconrad/followers","following_url":"https://api.github.com/users/blairconrad/following{/other_user}","gists_url":"https://api.github.com/users/blairconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/blairconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairconrad/subscriptions","organizations_url":"https://api.github.com/users/blairconrad/orgs","repos_url":"https://api.github.com/users/blairconrad/repos","events_url":"https://api.github.com/users/blairconrad/events{/privacy}","received_events_url":"https://api.github.com/users/blairconrad/received_events","type":"User","site_admin":false},"labels":[{"id":27960132,"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/labels/breaking","name":"breaking","color":"e102d8","default":false},{"id":27946157,"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/labels/bug","name":"bug","color":"e11d21","default":true},{"id":73309511,"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/labels/P2","name":"P2","color":"732787","default":false}],"state":"closed","locked":false,"assignee":{"login":"blairconrad","id":3275797,"avatar_url":"https://avatars.githubusercontent.com/u/3275797?v=3","gravatar_id":"","url":"https://api.github.com/users/blairconrad","html_url":"https://github.com/blairconrad","followers_url":"https://api.github.com/users/blairconrad/followers","following_url":"https://api.github.com/users/blairconrad/following{/other_user}","gists_url":"https://api.github.com/users/blairconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/blairconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairconrad/subscriptions","organizations_url":"https://api.github.com/users/blairconrad/orgs","repos_url":"https://api.github.com/users/blairconrad/repos","events_url":"https://api.github.com/users/blairconrad/events{/privacy}","received_events_url":"https://api.github.com/users/blairconrad/received_events","type":"User","site_admin":false},"assignees":[{"login":"blairconrad","id":3275797,"avatar_url":"https://avatars.githubusercontent.com/u/3275797?v=3","gravatar_id":"","url":"https://api.github.com/users/blairconrad","html_url":"https://github.com/blairconrad","followers_url":"https://api.github.com/users/blairconrad/followers","following_url":"https://api.github.com/users/blairconrad/following{/other_user}","gists_url":"https://api.github.com/users/blairconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/blairconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairconrad/subscriptions","organizations_url":"https://api.github.com/users/blairconrad/orgs","repos_url":"https://api.github.com/users/blairconrad/repos","events_url":"https://api.github.com/users/blairconrad/events{/privacy}","received_events_url":"https://api.github.com/users/blairconrad/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/milestones/31","html_url":"https://github.com/FakeItEasy/FakeItEasy/milestones/3.0.0","labels_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/milestones/31/labels","id":2135487,"number":31,"title":"3.0.0","description":"3.0.0 release","creator":{"login":"blairconrad","id":3275797,"avatar_url":"https://avatars.githubusercontent.com/u/3275797?v=3","gravatar_id":"","url":"https://api.github.com/users/blairconrad","html_url":"https://github.com/blairconrad","followers_url":"https://api.github.com/users/blairconrad/followers","following_url":"https://api.github.com/users/blairconrad/following{/other_user}","gists_url":"https://api.github.com/users/blairconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/blairconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairconrad/subscriptions","organizations_url":"https://api.github.com/users/blairconrad/orgs","repos_url":"https://api.github.com/users/blairconrad/repos","events_url":"https://api.github.com/users/blairconrad/events{/privacy}","received_events_url":"https://api.github.com/users/blairconrad/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":4,"state":"open","created_at":"2016-11-15T01:34:59Z","updated_at":"2016-11-20T17:56:51Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2016-08-17T10:16:16Z","updated_at":"2016-11-20T18:22:17Z","closed_at":"2016-11-20T17:56:51Z","body":"Spun off from #806.\n\nCurrently, an unconfigured method with a return value will return a `Dummy` of the appropriate type when called.\n\nHowever, as soon as we start building a rule (for example, when we add an `Invokes` behaviour to the method), we create a rule that will return the \"default value\" for the type, as we can see in [BuildableCallRule's constructor](https://github.com/FakeItEasy/FakeItEasy/blob/40e6aefec60d17cbebe6c39c34e1089adb0881b9/src/FakeItEasy/Configuration/BuildableCallRule.cs#L23). `GetDefaultValue` [returns null for a reference type or an instance for a value type](https://github.com/FakeItEasy/FakeItEasy/blob/46becf4a6cc8d72ddefc8ca024167d29979efdde/src/FakeItEasy/TypeExtensions.cs#L33).\n\nAnd then if we decide to have the method `DoesNothing`, the rule is modified so that it will [not set the return value at all](https://github.com/FakeItEasy/FakeItEasy/blob/8e950d803b0a7efc45b17cd882cd0ee7b88dda05/src/FakeItEasy/Configuration/RuleBuilder.cs#L66) (and this is the cause of the bug that @thomaslevesque found).\n\nI think that all three situations should use the \"unconfigured behaviour\" and return a `Dummy` (or nothing for a void of course).\n"},"comment":{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/comments/261794983","html_url":"https://github.com/FakeItEasy/FakeItEasy/issues/830#issuecomment-261794983","issue_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/830","id":261794983,"user":{"login":"thomaslevesque","id":1864281,"avatar_url":"https://avatars.githubusercontent.com/u/1864281?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaslevesque","html_url":"https://github.com/thomaslevesque","followers_url":"https://api.github.com/users/thomaslevesque/followers","following_url":"https://api.github.com/users/thomaslevesque/following{/other_user}","gists_url":"https://api.github.com/users/thomaslevesque/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaslevesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaslevesque/subscriptions","organizations_url":"https://api.github.com/users/thomaslevesque/orgs","repos_url":"https://api.github.com/users/thomaslevesque/repos","events_url":"https://api.github.com/users/thomaslevesque/events{/privacy}","received_events_url":"https://api.github.com/users/thomaslevesque/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T18:22:17Z","updated_at":"2016-11-20T18:22:17Z","body":"> I wonder if we're going for an alpha002 or a beta001…\r\n\r\nWell, Castle.Core 4.0.0 is beta now, so I guess we could do a beta as well, and release a final version once Castle.Core goes final too."}}
{"actor":{"display_login":"thomaslevesque"}}