Ejemplo n.º 1
0
        public void TestMethodRemoveLastChar()
        {
            //arrange
            PinController   controller = new PinController();
            CinemaViewModel model      = new CinemaViewModel()
            {
                PinValue = "246"
            };

            //act
            controller.TempData["model"] = model;
            controller.PinViewRemoveChar();
            //assert
            model = (CinemaViewModel)controller.TempData["model"];
            Assert.AreEqual(model.PinValue.Length, 2);
        }