コード例 #1
0
        public void UpdatePersonalDetailsTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            UserRegistration objUserReg = new UserRegistration(); // TODO: Initialize to an appropriate value
            int UserId = InsertDummyUser("tj_op");
            TributesPortal.BusinessEntities.Users objUsers = new TributesPortal.BusinessEntities.Users();
            objUsers.UserId = UserId;
            objUsers.FirstName = "Tajinder1";
            objUsers.LastName = "Kaur1";
            objUsers.City = "Noida";
            objUsers.State = null;
            objUsers.Country = 5;
            objUsers.UserImage = null;
            objUserReg.Users = objUsers;
            target.UpdatePersonalDetails(objUserReg);

            UserRegistration objUserReg1 = new UserRegistration();
            TributesPortal.BusinessEntities.Users objUsers1 = new TributesPortal.BusinessEntities.Users();
            objUsers1.UserId = UserId;
            objUserReg1.Users = objUsers1;
            target.GetUserDetails(objUserReg1);

            Assert.AreEqual("Tajinder1", objUserReg1.Users.FirstName);
            Assert.AreEqual("Kaur1", objUserReg1.Users.LastName);
            Assert.AreEqual("Noida", objUserReg1.Users.City);
            Assert.AreEqual(5, objUserReg1.Users.Country);
        }