コード例 #1
0
        public void Delete_ReturnsCorrectView_True()
        {
            StylistsController controller = new StylistsController();
            ActionResult       Delete     = controller.Delete(1);

            Assert.IsInstanceOfType(Delete, typeof(RedirectToActionResult));
        }
コード例 #2
0
        public void Delete_ReturnsCorrectActionType_RedirectToActionResult()
        {
            //Arrange
            StylistsController controller = new StylistsController();

            //Act
            IActionResult view = controller.Delete(1);

            //Assert
            Assert.IsInstanceOfType(view, typeof(RedirectToActionResult));
        }
コード例 #3
0
        public void Delete_ReturnsCorrectView_True()
        {
            string             firstName   = "Sylvia";
            string             lastName    = "Green";
            string             phoneNumber = "206-555-6789";
            Stylist            stylist     = new Stylist(firstName, lastName, phoneNumber);
            int                id          = stylist.GetId();
            StylistsController controller  = new StylistsController();
            ActionResult       deleteView  = controller.Delete(id);

            Assert.IsInstanceOfType(deleteView, typeof(ViewResult));
        }