Last active
January 1, 2016 23:48
-
-
Save hmemcpy/8218569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AcountProvider provider = AccountProvider.CreateProvider(); | |
AcountProvider outProvider; | |
A.CallTo(() => mockAppointment.GetAccountCollection().GetProviderImpl(out outProvider)) // GetProviderImpl is a generic method | |
.Returns(true) | |
.AssignsOutAndRefParameters(provider); | |
bool result = mockAppointment.GetAccountCollection().GetProviderImp(out outProvider); // this returns false and provider is null??? |
Well, extracting a separate fake for IAccountCollectionProvider did the trick! Odd, I'm sure I tried it first... Anyway, I'll open an issue later, if this really turns out to be a bug!
Thanks!
No probs.
I remember the details now. This is actually by design. Unconfigured fake methods return a new instance each time and unconfigured fake properties return the same instance each time. Excruciating detail can be found in this conversation FakeItEasy/FakeItEasy#156
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
things that spring to mind:-