Closed ghost closed 6 years ago
This shouldn't really affect mocking, you can already Mock SignInManager<TUser>
already, existing code is already asking for SignInManager from DI, irrespective of this being a breaking change, adding an interface isn't going to change anything unless all the consuming code was updated to depend on this new interface.
See https://github.com/aspnet/Identity/blob/f51af820a5ccf2268b785c62140b29bbb5a24e83/test/Identity.Test/SecurityStampValidatorTest.cs#L105 for an example of how we mock sign in manager today
I know that. It was just the act of my annoyance. Actually I think that it is better to separate this huge classes to smaller with less injected dependencies or to remove null checks for some dependencies in their constructors so to eliminate the need to be mocked 5-6 classes just to simulate return value for one method only.
It is terrible to mock SignInManager without an interface.