示例#1
0
        public void ViewSelectionTest()
        {
            // Arrange  - create the controller
            var controller = new ExampleController();

            // Act  - call the action method
            ViewResult result = controller.Index_Model();

            // Assert
            Assert.AreEqual(string.Empty, result.ViewName);
            Assert.IsInstanceOfType(result.Model, typeof(DateTime));
            Assert.IsInstanceOfType(result.ViewData.Model, typeof(DateTime));
        }