public void GetUserByUserNameTest()
        {
            //Arrange
            B_UserController uCtr           = new B_UserController();
            string           expectedResult = _testUserName;

            //Act
            User user = uCtr.GetUserByUserName(_testUserName);

            //Assert
            Assert.AreEqual(expectedResult, user.UserName);
        }
Exemple #2
0
        public ActionResult UserInfoPartial(Models.UserViewModel userDetails)
        {
            B_UserController bUCtr = new B_UserController();
            User             user  = bUCtr.GetUserByUserName(User.Identity.Name);

            userDetails.UserName = user.UserName;
            userDetails.Email    = user.Email;
            userDetails.Phone    = user.Phone;
            userDetails.ZipCode  = user.ZipCode;
            userDetails.Region   = user.Region;
            return(PartialView(userDetails));
        }