Possible Duplicate:
How do I mock the HttpContext in ASP.NET MVC using Moq?
One of my DLL's has a method like this
public void RegisterPerson(Person p, HttpContext context)
{
//extract Ip
person.Ip=context.Request.UserHostAddress;
//Dome something Else
}
In My test i want to create a fake context and pass it to method, as Below
[TestMethod]
public void InsertPerson()
{
Person p= new Person();
_service.RegisterPerson(p, /*Fake context here*/);
}
Please suggest me how to do this.