Add CollectionOfFake overload that accepts an action that uses fake number to configure fake
See original GitHub issueSplit from #1837, as proposed by @PiotrKlecha, whose compelling example was
A new overload for A.CollectionOfFake could also simplify assigning a unique name to each Fake:
var fakes = A.CollectionOfFake<IInterface>(3, (o, i) => o.Named($"Fake{i}"));
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Releases · FakeItEasy/FakeItEasy
Add CollectionOfFake overload that accepts an action that uses fake number to configure fake (#1838). A.CollectionOfFake<ICollectionItem>(count, (options, ...
Read more >FakeItEasy A.CollectionOfFake doesn't work
Based on @Blair Conrad's answer, this is what it looks like. I debugged the tests and it indeed returns faked list based on...
Read more >FakeItEasy (@fakeiteasyfx) / Twitter
New Add CollectionOfFake overload that accepts an action that uses fake number to configure fake (#1838) A.CollectionOfFake(count, (options, i) => options.
Read more >Specifying a Call to Configure
One of the first steps in configuring a fake object's behavior is to specify which call to configure. Like most FakeItEasy actions, this...
Read more >Newest 'fakeiteasy' Questions
I am faking a service using FakeItEasy string phone = "123456"; var response = new VerifyResponse(); var fakeVerifyService = A.Fake< ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@blairconrad This looks simple enough, so I guess I could give it a try.
Thanks, @PiotrKlecha! Look for your name in the release notes! 🥈