public void TestIdOkSelectionView()
        {
            //Arange
            RestaurantsController controller = new RestaurantsController();

            //Act
            ViewResult result = controller.Selection(1) as ViewResult;

            //Assert
            Assert.IsNotNull(result);
        }
        public void TestSelectionRedirect()
        {
            //Arange
            RestaurantsController controller = new RestaurantsController();

            //Act
            RedirectToRouteResult result = (RedirectToRouteResult)controller.Selection(null);

            //ASSERT
            Assert.AreEqual("Index", result.RouteValues["action"]);
        }
        public void TestIndexViewData()
        {
            RestaurantsController controller = new RestaurantsController();

            //Act
            ViewResult result = controller.Index() as ViewResult;
            Restaurant resto = ((List<Restaurant>)result.ViewData.Model).First();

            //Assert
            Assert.AreEqual("Restaurant Le Clos des Sens", resto.Nom);
        }
        public void TestSelectionViewData()
        {
            //Arange
            RestaurantsController controller = new RestaurantsController();

            //Act
            ViewResult result = controller.Selection(1) as ViewResult;
            Restaurant resto = (Restaurant)result.ViewData.Model;

            //Assert
            Assert.AreEqual("Restaurant Le Clos des Sens", resto.Nom);
        }