Ejemplo n.º 1
0
        public void EditLoadsValidId()
        {
            // act
            ViewResult res = vbController.Edit(961) as ViewResult;

            // assert
            Assert.AreEqual("Edit", res.ViewName);
        }
Ejemplo n.º 2
0
        public void EditLoadsValidId()
        {
            // act
            RedirectToRouteResult result = controller.Edit(vbPlayers[0]) as RedirectToRouteResult;

            // assert
            Assert.IsNotNull(result);
        }
        public void EditLoadsValidId()
        {
            //act

            var results = (List <VbPlayer>)((ViewResult)controller.Edit(1)).Model;

            // assert
            CollectionAssert.AreEqual(vbPlayers, results);
        }
Ejemplo n.º 4
0
        public void EditInvalidId()
        {
            controller.ModelState.AddModelError("Deatails", "error");
            // act
            ViewResult result = controller.Edit(vbPlayers[0]) as ViewResult;

            // assert
            Assert.IsNotNull(result);
        }
        public void EditLoadsValidId()
        {
            // act

            RedirectToRouteResult value = controller.Edit(vbPlayers[0]) as RedirectToRouteResult;

            // assert

            Assert.AreEqual("Index", value.RouteValues["action"]);
        }
        public void EditLoadsValidId()
        {
            // Arrange
            //Handled in TestInitiliaze

            // Act
            ViewResult result = controller.Edit(961) as ViewResult;

            // Assert
            Assert.AreEqual("Edit", result.ViewName);
        }
        public void EditViewLoadGet()
        {
            //act
            ViewResult result = controller.Edit(961) as ViewResult;

            //Assert
            Assert.AreEqual("Edit", result.ViewName);
        }
Ejemplo n.º 8
0
        public void EditLoadsValidId()
        {
            ViewResult result = (ViewResult)controller.Edit(vbPlayers[0].VbPlayerId);

            Assert.AreEqual("Edit", result.ViewName);
        }