-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substiture for ILoggerFactory.CreateLogger<T> #728
Comments
@alvipeo var loggerFactory = Substitute.For<ILoggerFactory>();
loggerFactory.CreateLogger(null).ReturnsForAnyArgs(NullLogger<MyType>.Instance); Or maybe just use |
In addition to @olegd-superoffice's suggestion on returning a substitute/ |
related: #597 |
@alvipeo Could you please close this issue if your question was answered? |
I think the question has been answered and therefore I will close this one. Please let us know if you need further information or would like us to take another look at this |
In almost any .NET project I need to have a substitute for
ILoggerFactory
and its probably most used methodCreateLogger<T>()
. It returnsILogger<T>
, which is in turn:Any idea how could this be substituted?
The text was updated successfully, but these errors were encountered: