my code does it
string domainUrl = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority);
int result = string.Compare(domainUrl, "http://www.facebookmustdie.com");
How can I mock this so that my unit test passes, do I need to make fun of the whole HttpContext class? And if that were the case, how would I inject this into the code, so the “correct” HttpContext will be used when the unit test is run
source
share