
Memoires of a http request - How I got unit tested
Recently, I was working on a project where I needed to retrieve the access token from HttpContext and use this token to perform an HTTP request to get additional user info from an OpenID Connect (OIDC) UserInfo endpoint.All this logic was encapsulated in a single service class.Unit testing this class was giving me all sorts of issues and headaches…