Пример #1
0
        public void Index_Get_ReturnsViewWithDefaultModel()
        {
            // Arrange
            FizzBuzzViewModel expectedViewModel = FizzBuzzViewModel.CreateDefault();

            // Act
            //TODO: invoke the Index() action
            var result = _controller.Index() as ViewResult;

            // Assert
            //TODO: assert that the correct ActionResult is returned
            //TODO: assert that the correct ViewModel is used
            Assert.IsNotNull(_controller);
            Assert.That(result.Model, Is.EqualTo(expectedViewModel));
        }
 public ViewResult Index()
 {
     return(View(FizzBuzzViewModel.CreateDefault()));
 }