M
M
Mikhail2019-04-20 12:22:29
ASP.NET
Mikhail, 2019-04-20 12:22:29

How to test a method that takes an HttpContext?

I have an interface:

interface IAuthUserService 
{
    Task SignInAsync(HttpContext httpContext, string email, bool isPersistent = false);
    Task SignOutAsync(HttpContext httpContext);
}

I want to test it, but I don't understand how to lock HttpContext. Tried like this, but for some reason the test says that it's false, not true. How to fix?
5cbae4c14889a168632861.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question