You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be a breaking change and to me it would be unsuspected behaviour. Consider this:
var fake = A.Fake<IInterface>();
A.CallTo(() => fake.Items.Add(A._)).Throws(new Exception());
That wouldn't be possible if we did return a list.
I can't think of a real use case where this is beneficial. That something is exposed as IList<T> does in no way imply that the List<T> will be used. The behaviour of the Add-method may very well vary between implementors.
That's true, that's a breaking change for that case.
I didn't have your example in any case yet.
The style I do TDD I would never have such a setup that's why I didn't have your use case in mind.
While thinking about it I come to the same conclusion. The things I had in mind are no real world use cases I would have. If any pop up again, I will rethink it and come up with a solution that has no breaking changes.
No description provided.
The text was updated successfully, but these errors were encountered: