コード例 #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.");
        }
コード例 #2
0
        public void SaveMessageTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            UserBusiness objBusinessUser = new UserBusiness(); // TODO: Initialize to an appropriate value

            int UserId = InsertDummyBusinessUser("tj_op_business2");
            objBusinessUser.UserId = UserId;
            objBusinessUser.UserName = "******";
            objBusinessUser.WelcomeMessage = "Hello TJ";
            string AppDomain = "yourtribute";
            target.SaveMessage(objBusinessUser,AppDomain);

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

            Assert.AreEqual("Hello TJ", objUserReg1.UserBusiness.WelcomeMessage);
            // Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #3
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);
        }
コード例 #4
0
        public void SaveImageTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value

            UserBusiness objBusinessUser = new UserBusiness(); // TODO: Initialize to an appropriate value

            int UserId = InsertDummyBusinessUser("tj_op_business2");
            objBusinessUser.UserId = UserId;
            objBusinessUser.UserName = "******";
            objBusinessUser.CompanyLogo = "images/bbb.gif";
            target.SaveImage(objBusinessUser);

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

            Assert.AreEqual("images/bbb.gif", objUserReg1.UserBusiness.CompanyLogo);

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