public void GivenALoggedInUser_WhenNewIsCalled_ThenTheNewViewIsReturned() { MockHttpContext.SetupProperty(h => h.User); SetControllerContext(_controller); _controller.HttpContext.User = new UserViewModel { IsLoggedIn = true }; ActionResult result = _controller.New(); Assert.That(result, Is.TypeOf <ViewResult>()); }