private void doFacebookDisconnect() { StateManager stateManager = StateManager.Instance; SessionValue objSessionvalue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session); StringBuilder sbr = new StringBuilder(); if (objSessionvalue == null) { messageText.Text = "Your Tribute session had expired. Please log in."; refreshPage.Text = Request.QueryString["source"].ToString().Equals("headerLogin") ? "false" : "true"; } else { UserRegistration objUserReg = new UserRegistration(); TributesPortal.BusinessEntities.Users objUsers = new TributesPortal.BusinessEntities.Users(); objUsers.UserId = objSessionvalue.UserId; objUserReg.Users = objUsers; UserInfoManager umgr = new UserInfoManager(); umgr.RemoveFacebookAssociation(objUserReg); HttpContext.Current.Session.Clear(); if (string.IsNullOrEmpty(objSessionvalue.UserEmail)) { sbr.Append("<div class=\"yt-Error\"><h3>Urgent: You must <a href=\""); sbr.Append(Session["APP_BASE_DOMAIN"].ToString()); sbr.Append("adminprofileemailpassword.aspx\">set up an email address and password</a>!</h3>"); sbr.Append("Your account was disconnected from Facebook, but you do not have an "); sbr.Append("email address and password on file. If you do not create a password "); sbr.Append("then you will not be able to login later.</div>"); messageText.Text = sbr.ToString(); } else { messageText.Text = "<div class=\"yt-Notice\">Facebook was disconnected from your account.</div>"; } } }
public void RemoveFacebookAssociationTest() { UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value UserRegistration _objUserRegistration = null; // TODO: Initialize to an appropriate value target.RemoveFacebookAssociation(_objUserRegistration); Assert.Inconclusive("A method that does not return a value cannot be verified."); }