question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add CollectionOfFake overload that accepts an action that uses fake number to configure fake

See original GitHub issue

Split 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:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
PiotrKlechacommented, May 24, 2021

@blairconrad This looks simple enough, so I guess I could give it a try.

0reactions
blairconradcommented, Jun 7, 2021

Thanks, @PiotrKlecha! Look for your name in the release notes! 🥈

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found