Example #1
0
        public void DeleteConfirmedTest()
        {
            // Arrange
            GenresController controller = new GenresController();

            // Act
            var result = controller.DeleteConfirmed(0);

            // Assert
            Assert.IsNotNull(result);
        }
        public void DeleteConfirmedValidId()
        {
            //Arrange
            FakeGenreBL fake = new FakeGenreBL();
            //fake.createGenres();
            GenresController controller = new GenresController(fake);

            controller.testCase = true;
            //var result = (VideoGame)((ViewResult)controller.Details(1)).Model;
            // Act
            System.Web.Mvc.RedirectToRouteResult actual = (System.Web.Mvc.RedirectToRouteResult)controller.DeleteConfirmed(1);
            // Assert
            Assert.AreEqual("Index", actual.RouteValues["action"]);
        }