public void InfrastructureController_AddMultipleIdenticalInformationMessages() { var userService = new Mock <IUserService>(); var adwService = new Mock <IAdwService>(); var controller = new TestPagedGridController(userService.Object, adwService.Object); var result = controller.AddMultipleIdenticalInformationMessages() as ViewResult; Assert.IsNotNull(result); Assert.IsTrue(((IEnumerable <string>)result.Model).Count() == 1); Assert.IsTrue(((IEnumerable <string>)result.Model).Contains(TestPagedGridController.InformationMessage)); }