Пример #1
0
        //public void Index()
        public async Task CheckIfRetunIndexView()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = await controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Пример #2
0
        //public void Index()
        public async Task Index()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = await controller.Index() as ViewResult;
            var liftOffer = (LiftOffer)result.ViewData.Model;

            // Assert
            Assert.AreEqual(6, liftOffer.LiftOfferID);
        }