Hi folks,
i have the following code, which fails during runtime...
var mock = new Mock<ControllerContext>();
mock.SetupGet(x => x.HttpContext.Request
.ServerVariables["HTTP_HOST"]).Returns(domain);
** RunTime Error: Invalid setup on non-overridable property
I've got some code in my controller, which needs to check the domain the user has requested/gone to.
I'm not sure how to mock it up? any ideas?
PS. I'm using the Moq framewoke in the above example .. so I'm not sure if that's an issue, etc.?