{"action":"created","issue":{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/534","labels_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/534/labels{/name}","comments_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/534/comments","events_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/534/events","html_url":"https://github.com/FakeItEasy/FakeItEasy/issues/534","id":105420115,"number":534,"title":"Stacking multiple results on the same call configuration instance doesn't work","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},"labels":[{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/labels/0%20-%20Backlog","name":"0 - Backlog","color":"CCCCCC"},{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/labels/enhancement","name":"enhancement","color":"02e10c"},{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/labels/P3","name":"P3","color":"a349a7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-09-08T16:33:50Z","updated_at":"2015-10-25T22:48:33Z","closed_at":null,"body":"Sorry if the title is not clear, here's an example to illustrate the problem.\r\n\r\nI expected the two following snippets to be equivalent:\r\n\r\n```c#\r\n// Snippet 1\r\nA.CallTo(() => foo.Get()).Returns(42);\r\nA.CallTo(() => foo.Get()).Returns(100).Twice();\r\n\r\n// Snippet 2\r\nvar call = A.CallTo(() => foo.Get());\r\ncall.Returns(42);\r\ncall.Returns(100).Twice();\r\n```\r\n\r\nBut apparently they're not. With the first snippet, successive calls to `foo.Get()` return 100, 100, 42, 42, 42, 42 ... (as expected). But with the second snippet, successive calls to `foo.Get()` return 100, 100, 0, 0, 0, 0... The first `Returns()` is ignored; the second `Returns()` apparently overwrites the first, rather than stacking upon it.\r\n\r\nIs this the expected behavior? If it is, it's quite confusing, and goes against the principle of least surprise. I sometimes store the result of `A.CallTo()` to avoid repeating it multiple times (usually because I want to configure the call AND verify that it happened), and I certainly didn't expect this behavior."},"comment":{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/comments/150981246","html_url":"https://github.com/FakeItEasy/FakeItEasy/issues/534#issuecomment-150981246","issue_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/534","id":150981246,"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":"2015-10-25T22:48:33Z","updated_at":"2015-10-25T22:48:33Z","body":"I added a few scenarios in ConfigurationSpecs. Not sure if it's the right place to put them, or if they're correctly implemented..."}}