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.

Expose Fake.TryGetFakeManager and Fake.IsFake

See original GitHub issue

I wonder if it would be possible to make Fake.TryGetFakeManager public?

I have a test utility that makes auto-wrapping fakes and I would like to ensure that the provided object is not already a fake - preferably without catching an exception 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
blairconradcommented, Nov 23, 2019

Okay, @thomaslevesque. I’m convinced. On Fake,

public static bool TryGetFakeManager(object potentialFake, out FakeManager fakeManager);
public static bool IsFake(object potentialFake);

(If this gets added after nullability warnings are enabled, I’d mark the fakeManager parameter in the first call with a NotNullWhen(true).)

Should be fairly straightforward, even including updating the Advanced Usage docs.

0reactions
blairconradcommented, Nov 25, 2019

Thanks for proposing and implementing this issue, @asgerhallas. Look for your name in the release notes! 🥇

Read more comments on GitHub >

github_iconTop Results From Across the Web

How should I handle fake co-workers (upper management ...
How should I handle fake co-workers (upper management, supervisor, etc) who smile in my face and backstab me at my job?
Read more >
my new coworker is putting fake mistakes in my work so ...
my new coworker is putting fake mistakes in my work so she can tell our boss I'm bad at my job. by Alison...
Read more >
How to Manage in Company with Fake Experience - YouTube
In this video we have explained to people asking for questions Should I show Fake Experience to Get Job in Testing? Should I...
Read more >
Who Is Falling for Fake News? - Knowledge at Wharton
The professors found that relatively few sites account for most of the fake news, so rather than rating individual articles as true or...
Read more >
Fake profiles on social media lure people into “investing” in ...
Fraudsters are setting up fake profiles on popular social media websites and making out they are successful Binary Options or Forex Traders.
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