Answering my own question in case someone else has the same problem in the future:
In the code provided, even though we extend the IUserStore
to IEmailUserStore
when mocking, we still need to manually set the boolean value that enables email support for DefaultUI
in _userManagerMock
before passing it as a parameter to _signInManager
:
_ = _userManagerMock.Setup(x => x.SupportsUserEmail)
.Returns(true);