public void Update_ReturnsCorrectView_True()
        {
            StylistController controller = new StylistController();
            ActionResult      updateView = controller.Update(1, "name", "details");

            Assert.IsInstanceOfType(updateView, typeof(RedirectToActionResult));
        }
        public void Delete_ReturnsCorrectView_True()
        {
            StylistController controller = new StylistController();
            ActionResult      deleteView = controller.DeleteAll();

            Assert.IsInstanceOfType(deleteView, typeof(RedirectToActionResult));
        }
        public void UpdateForm_ReturnsCorrectView_True()
        {
            StylistController controller = new StylistController();
            ActionResult      updateView = controller.UpdateForm(1);

            Assert.IsInstanceOfType(updateView, typeof(ViewResult));
        }
        public void Add_ReturnsCorrectView_True()
        {
            StylistController controller = new StylistController();
            ActionResult      addView    = controller.Add("Jidenna", "Works Monday");

            Assert.IsInstanceOfType(addView, typeof(RedirectToActionResult));
        }
        public void Details_ReturnsCorrectView_True()
        {
            StylistController controller  = new StylistController();
            ActionResult      detailsView = controller.Details(1);

            Assert.IsInstanceOfType(detailsView, typeof(ViewResult));
        }
        public void EditForm_HasCorrectModelType_Dictionary()
        {
            ViewResult resultsView = new StylistController().EditForm(3) as ViewResult;
            var        result      = resultsView.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(Dictionary <string, object>));
        }
        public void AddForm_ReturnsCorrectView_True()
        {
            StylistController controller  = new StylistController();
            ActionResult      addFormView = controller.AddForm();

            Assert.IsInstanceOfType(addFormView, typeof(ViewResult));
        }
        public void Index_HasCorrectModelType_List()
        {
            ViewResult resultsView = new StylistController().Index() as ViewResult;
            var        result      = resultsView.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(List <Stylist>));
        }
        public void Index_ReturnsCorrectView_True()
        {
            StylistController controller = new StylistController();
            ActionResult      allView    = controller.Index();

            Assert.IsInstanceOfType(allView, typeof(ViewResult));
        }
Example #10
0
        public void Create_CorrectView_True()
        {
            StylistController controller = new StylistController();
            ActionResult      createView = controller.Create();

            Assert.IsInstanceOfType(createView, typeof(ViewResult));
        }
Example #11
0
        public void ViewAll_CorrectView_True()
        {
            StylistController controller  = new StylistController();
            ActionResult      viewAllView = controller.ViewAll();

            Assert.IsInstanceOfType(viewAllView, typeof(ViewResult));
        }
Example #12
0
        public void CreateForm_ReturnsCorrectView_True()
        {
            //Arrange
            ActionResult result = new StylistController().CreateForm();

            //Assert
            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
Example #13
0
        public void Details_ReturnsCorrectView_True()
        {
            //Arrange
            int          id     = 2;
            ActionResult result = new StylistController().Details(id);

            //Assert
            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
        public void Stylists_ReturnsCorrectView_True()
        {
            //Arrange
            StylistController controller   = new StylistController();
            IActionResult     actionResult = controller.Stylists();
            ViewResult        stylistsView = controller.Stylists() as ViewResult;

            //Act
            var result = stylistsView.ViewData.Model;

            //Assert
            Assert.IsInstanceOfType(result, typeof(List <Stylist>));
        }