How to get access to parameters value in Returns() using FakeItEasy?
Ok, it would seem that ReturnsLazily() is the answer. So here’s what I did: var factory = A.Fake<IFactory> (); A.CallTo (() => factory.Create (A<string>.Ignored, A<string>.Ignored)) .ReturnsLazily ((string name, string data) => new Data (name, data)); var module = new QuickModule (factory); var list = module.GetData (); Is this the recommended way or is there another?