Open chrisalexander opened 9 years ago
It looks like the other mocking frameworks support this as well: http://nsubstitute.github.io/help/multiple-returns/ https://github.com/Moq/moq4/wiki/Quickstart https://github.com/FakeItEasy/FakeItEasy/wiki/Specifying-return-values
So, it should be possible to implement this in Machine.Fakes. The interesting part is how to design the API for it and whether all frameworks can be accommodated.
RhinoMocks allows for the ability to return different objects the second, third, fourth etc. time that a method is called. This is particularly useful when you are mocking a factory for use in the class under test, for example:
This will mean Factory.Create(string.Any) will return Object1 the first time it is called, and Object2 the second time.
Is there potential for support this in Machine.Fakes? Thanks!