I have Web Api controller Action method
I am trying to unit test. I have one custom filter which runs before that action controller.
I have question regarding HttpContext.Current.User.Identity.Name
that I am using inside my custom action filter.
It works nicely when I send my http post request from web client.
But, when I send http post request from my unit test than HttpContext.Current
always complain for null
Don't understand where and what is wrong. Anybody can please explain it?
Please note that I have seen answers at here but not sure where I need to add that code in my case.