Method I'm trying to unit test returns:
return Json(new { ok = true, newurl = Url.Action("Index") });
But this line throws NullReferenceException
which is caused by this part of return:
newurl = Url.Action("Index")
I was trying to make something with:
Request.SetupGet(x => x.Url).Returns(// Data here);
with no effects.
Can You suggest me any solution?