コード例 #1
0
        public void UpdatePrivacySettingsTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            //UserRegistration _objUserRegistration = null; // TODO: Initialize to an appropriate value
            int UserId = InsertDummyUser("tj_op");
            UserRegistration objUserReg = new UserRegistration();
            TributesPortal.BusinessEntities.Users objUsers = new TributesPortal.BusinessEntities.Users();
            objUsers.UserId = UserId;
            objUsers.IsUsernameVisiable = true;
            objUsers.IsLocationHide = false;
            objUsers.AllowIncomingMsg = true;
            objUserReg.Users = objUsers;
            target.UpdatePrivacySettings(objUserReg);

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

            Assert.AreEqual(false, objUserReg1.Users.IsLocationHide);
            Assert.AreEqual(true, objUserReg1.Users.AllowIncomingMsg);
            Assert.AreEqual(true, objUserReg1.Users.IsUsernameVisiable);

            // Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }