Example #1
0
        public void TestUpdateContactById()
        {
            //Arrange
            var testGetContacts         = GetAllContacts();
            UserInfoController mvcContr = new UserInfoController();
            //Act
            ActionResult result = mvcContr.AddOrEdit(1);

            //Assert
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(System.Web.Mvc.ViewResult));
        }
Example #2
0
        public void TestGetContactsWithModelObject()
        {
            //Arrange
            var testGetContacts         = GetAllContacts();
            UserInfoController mvcContr = new UserInfoController();
            mvcUserInfoModel   model    = new mvcUserInfoModel();
            //Act
            var result = mvcContr.AddOrEdit(model);

            //Assert
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(System.Web.Mvc.RedirectToRouteResult));
        }