public void Delete_Focus_Get_ReturnsView() { Focus fake = new Focus() { FocusId = 1, FocusName = "test", Description = "test" }; focusRepository.Setup(x => x.GetById(1)).Returns(fake); GroupController controller = new GroupController(groupService, groupUserService, userService, metricService, focusService, groupgoalService, groupInvitationService, securityTokenService, groupUpdateService, groupCommentService, goalStatusService, groupRequestService, followUserService, groupCommentUserService, groupUpdateSupportService, groupUpdateUserService); ViewResult result = controller.DeleteFocus(1) as ViewResult; Assert.IsNotNull(result, "View Result is null"); Assert.IsInstanceOf(typeof(Focus), result.ViewData.Model, "Wrong View Model"); var focus = result.ViewData.Model as Focus; Assert.AreEqual("test", focus.Description, "Got wrong Focus Description"); }