Mock GetExternalLoginInfoAsync() method

Viewed 409

I have private property to access AuthenticationManager:

private IAuthenticationManager AuthenticationManager => HttpContext.GetOwinContext().Authentication;

I want to mock the method GetExternalLoginInfoAsync() in order to receive fake ExternalLoginInfo object:

ExternalLoginInfo loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();

Both GetOwinContext() and GetExternalLoginInfoAsync() methods are extension methods. Is it possible to see source code of these methods to see how they works?

1 Answers
Related