public void InfrastructureController_AddNullPropertyErrorMessage() { var userService = new Mock <IUserService>(); var adwService = new Mock <IAdwService>(); var controller = new TestPagedGridController(userService.Object, adwService.Object); var result = controller.AddNullPropertyErrorMessage() as ViewResult; Assert.IsNotNull(result); Assert.IsTrue(result.ViewData.ModelMetadata.ModelType == typeof(bool)); Assert.IsTrue((bool)result.Model); }