public void ChangeEmailPasswordTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     GenralUserInfo _objGenralUserInfo = null; // TODO: Initialize to an appropriate value
     target.ChangeEmailPassword(_objGenralUserInfo);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
        public void CheckAndSendPasswordPopUpTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            GenralUserInfo _objGenralUserInfo = new GenralUserInfo(); // TODO: Initialize to an appropriate value
            UserInfo objUserInfo = new UserInfo();

            objUserInfo.UserEmail = "*****@*****.**";
            _objGenralUserInfo.RecentUsers = objUserInfo;

            bool _Reset = false; // TODO: Initialize to an appropriate value
            target.CheckAndSendPassword(_objGenralUserInfo, _Reset);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Example #3
0
 public void GetTributesFeedTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     Tributes objtribute = new Tributes();
     objtribute.UserTributeId = 9;
     object[] _MyTributes = { objtribute, 1, 1, 1000 };// TODO: Initialize to an appropriate value
     //object[] _MyTributes = new object();
     int expectedCount = 265;
     //List<GetTributesFeed> lstTributes = target.GetTributesFeed(_MyTributes);
     //lstTributes = target.GetTributesFeed(_MyTributes);
     List<GetTributesFeed> actual = new List<GetTributesFeed>();
     //actual = target.GetTributesFeed(_MyTributes);
     Assert.AreEqual(expectedCount, actual.Count);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     StateManager stateManager = StateManager.Instance;
     SessionValue objSessionvalue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session);
     if (objSessionvalue != null)
     {
         object[] objValue ={ objSessionvalue.UserId };
         UserInfoManager objinbox = new UserInfoManager();
         int _inboxcount = objinbox.UserInboxCount(objValue);
         lbtnInbox.Text = "Inbox (" + _inboxcount.ToString() + ")";
         lbtnInbox.Visible = true;
     }
     else
     {
         lbtnInbox.Visible = false;
     }
 }
 private void CheckAvailablity(string UserName, string Password)
 {
     string uName = string.Empty;
     HiddenField hf = (HiddenField)this.FindControl("ctl00$HiddenFieldAvailability");
     UserInfoManager objUserInfoManager = new UserInfoManager();
     GenralUserInfo _objGenralUserInfo = new GenralUserInfo();
     UserInfo objUserInfo = new UserInfo();
     objUserInfo.UserName = UserName;
     objUserInfo.UserPassword = Password.ToLower().ToString();;
     _objGenralUserInfo.RecentUsers = objUserInfo;
     objUserInfoManager.UserLogin(_objGenralUserInfo);
     if (_objGenralUserInfo.CustomError == null)
     {
          SetSessionValue(_objGenralUserInfo);
         Response.Write("true");
     }
     else
     {
         Response.Write("false");
     }
 }
 public void GetUserCompleteDetailsTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     UserRegistration _objUserRegistration = new UserRegistration(); // TODO: Initialize to an appropriate value
     _objUserRegistration.Users = new Users();
     _objUserRegistration.Users.UserId = InsertDummyUser("tj_op");
     target.GetUserCompleteDetails(_objUserRegistration);
     Assert.AreEqual("Tajinder1", _objUserRegistration.Users.FirstName);
     Assert.AreEqual("Kaur", _objUserRegistration.Users.LastName);
     Assert.AreEqual("tj_op", _objUserRegistration.Users.UserName);
     Assert.AreEqual("*****@*****.**", _objUserRegistration.Users.Email);
     //Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
        public void UserSiteAdminLoginTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            //InsertDummyUser("tj_op");
            GenralUserInfo objUser = new GenralUserInfo();
            UserInfo objUserInfo = new UserInfo();
            objUserInfo.UserName = "******";
            objUserInfo.UserPassword = "******";
            objUserInfo.FacebookUid = null;
            objUser.RecentUsers = objUserInfo;

            target.UserSiteAdminLogin(objUser);
            // Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
 public void EmailAvailableTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     string Email = string.Empty; // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     //actual = target.EmailAvailable(Email);
        // Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
        public void GetTributeOnIdTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            int UserId = InsertDummyUser("tj_op");
            int tributeId = 0;
            GetMyTributes _objtribute = new GetMyTributes();
            _objtribute.UserId = UserId;
            object[] _param = { _objtribute, 0, 1, 1 };
            if (_objtribute.CustomError == null)
            {
                List<GetMyTributes> Mytributes = new List<GetMyTributes>();
                Mytributes = target.GetMyTributes(_param);
                Assert.AreEqual(true, Mytributes.Count > 0);
                tributeId = Mytributes[0].TributeId;
            }
            TributesUserInfo _objTributeUserinfo = new TributesUserInfo(); // TODO: Initialize to an appropriate value
            _objTributeUserinfo.Tributes = new Tributes();
            _objTributeUserinfo.Tributes.TributeId = tributeId;
            target.GetTributeOnId(_objTributeUserinfo);

            //Write Asserts here once the stored procedure is fixed

            //Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    protected void popuplbtnSendemail_Click(object sender, EventArgs e)
    {
        GenralUserInfo objGenralUserInfo = new GenralUserInfo();
        UserInfo objUserInfo = new UserInfo();
        objUserInfo.UserEmail = txtLoginEmail1.Text;
        objGenralUserInfo.RecentUsers = objUserInfo;
        UserInfoManager objuse = new UserInfoManager();
        objuse.CheckAndSendPassword(objGenralUserInfo, false);
        if (objGenralUserInfo.CustomError != null)
        {
            string ErrorMsg = objGenralUserInfo.CustomError.ErrorMessage.ToString();
            if (ErrorMsg != "")
            {
                ScriptManager.RegisterClientScriptBlock(Page, GetType(), "HidePanel", "setForgotPassword_();", true);

            }
        }
        else
        {
            txtLoginEmail1.Text = string.Empty;

            StringBuilder strb = new StringBuilder();
            strb.Append("parent.modalClose_();");
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "HidePanel", strb.ToString(), true);
        }
    }
    private void doFacebookConnect()
    {
        StateManager stateManager = StateManager.Instance;
        SessionValue objSessionvalue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session);
        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;
            objUsers.FacebookUid = _FacebookUid;
            objUserReg.Users = objUsers;

            UserInfoManager umgr = new UserInfoManager();
            umgr.UpdateFacebookAssociation(objUserReg);
            StringBuilder sbr = new StringBuilder();
            if (objUserReg.CustomError != null)
            {

                var fbwc = new FacebookWebClient(FacebookWebContext.Current.AccessToken);
                var me = (IDictionary<string, object>)fbwc.Get("me");
                string fbName = (string)me["first_name"] + " " + (string)me["last_name"];

                sbr.Append(string.Format("<div class=\"yt-Error\"><h3>Sorry, {0}.</h3>", fbName));
                sbr.Append(string.Format(
                    "The Facebook account named {0} is aleady used by some other Your Tribute Account.",
                    fbName));
                sbr.Append("Would you like to:");
                sbr.Append("<ul>");
                sbr.Append("<li><a href=\"#\" onclick=\"fb_logout(); return false;\">");
                sbr.Append("   <img id=\"fb_logout_image\" ");
                sbr.Append("src=\"http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_small.gif\"");
                sbr.Append(" alt=\"Logout from Facebook and Your Tribute\"/></a> of both Your Tribute and Facebook Connect ");
                sbr.Append("and switch to the other account using your Facebook email address and password.</li>");
                sbr.Append("<li><a href=\"#\" onclick=\"fb_err_logout(); return false;\">");
                sbr.Append("<img id=\"fb_logout_image\" ");
                sbr.Append("src=\"http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_small.gif\"");
                sbr.Append(" alt=\"Disconnect from Facebook\"/></a> of Facebook Connect and try again.</li>");
                sbr.Append("<li><a href=\"javascript:void(0);\" onclick=\"OpenContactUS();\">Contact us</a> to discuss the situation further if you are confused.</li>");
                sbr.Append("</div>");

                messageText.Text = sbr.ToString();
                refreshPage.Text = "false";
            }
            else
            {
                if(Request.QueryString["source"].ToString().Equals("headerLogin"))
                {
                  refreshPage.Text = "true";
                } else {
                    messageText.Text = "<div class=\"yt-Notice\">Facebook Connection was added to your account.</div>";
                    refreshPage.Text = "false";
                }
            }
        }
    }
        public void GetMyEventsTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            Events onjevents = new Events();
            onjevents.UserId = InsertDummyUser("tj_op");
            object[] objvalue = { onjevents, 1, 1 };
            //object[] objValue = {,1,1}; // TODO: Initialize to an appropriate value
            List<Events> expected = new List<Events>(); // TODO: Initialize to an appropriate value
            Events objMyEvents = new Events();
            objMyEvents.EventID = 431;
            objMyEvents.EventName = "tj";
            objMyEvents.EventDesc = "Birthday";
            objMyEvents.EventDate = DateTime.Parse("03-11-2011 AM 12:00:00");
            objMyEvents.EventRsvp = "Awaiting Response";
            objMyEvents.TributeId = 38575;
            expected.Add(objMyEvents);

            List<Events> actual;
            actual = target.GetMyEvents(objvalue);
            Assert.AreEqual(expected[0].EventID, actual[0].EventID);
            Assert.AreEqual(expected[0].EventName, actual[0].EventName);
            Assert.AreEqual(expected[0].EventDesc, actual[0].EventDesc);
            Assert.AreEqual(expected[0].EventDate, actual[0].EventDate);
            Assert.AreEqual(expected[0].EventRsvp, actual[0].EventRsvp);
            Assert.AreEqual(expected[0].TributeId, actual[0].TributeId);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
 public void GetuserSentMessagesTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     object[] objValue = null; // TODO: Initialize to an appropriate value
     List<MailMessage> expected = null; // TODO: Initialize to an appropriate value
     List<MailMessage> actual;
     actual = target.GetuserSentMessages(objValue);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
        public void GetEventNameTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            Events actual;

            Events onjevents = new Events();
            onjevents.UserId = InsertDummyUser("tj_op");
            object[] objvalue = { onjevents, 1, 1 };

            actual = target.GetEventName(target.GetMyEvents(objvalue)[0].EventID);
            Assert.AreEqual("tj", actual.EventName);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
 public void GetImageTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     List<GiftImage> expected = null; // TODO: Initialize to an appropriate value
     List<GiftImage> actual;
     actual = target.GetImage();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void GetEmailNotoficationTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     UserRegistration _objUserRegistration = new UserRegistration(); // TODO: Initialize to an appropriate value
     _objUserRegistration.Users = new Users();
     _objUserRegistration.Users.UserId = InsertDummyUser("tj_op");
     target.GetEmailNotofication(_objUserRegistration);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.CommentsNotify);
     Assert.AreEqual(21080, _objUserRegistration.EmailNotification.EmailNotifyId);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.EventsNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.GiftsNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.GuestBookNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.MessagesNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.NewsLetterNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.NotesNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.PhotoAlbumNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.PhotosNotify);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.StoryNotify);
     Assert.AreEqual(21085, _objUserRegistration.EmailNotification.UserId);
     Assert.AreEqual(true, _objUserRegistration.EmailNotification.CommentsNotify);
     // Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void GetBusinessUserTributeListTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     SearchTribute objTributeParam = new SearchTribute(); // TODO: Initialize to an appropriate value
     objTributeParam.SearchString = "taj";
     objTributeParam.UserName = "******";
     objTributeParam.TributeType = "All";
     objTributeParam.PageSize = 1;
     objTributeParam.PageNumber = 1;
     //objTributeParam.SortOrder = "ASC";
     //List<SearchTribute> expected = null; // TODO: Initialize to an appropriate value
     string AppDomain = "yourtribute";
     List<SearchTribute> actual = target.GetBusinessUserTributeList(objTributeParam, AppDomain);
     Assert.AreEqual("tajinder", actual[0].TributeName);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void EmailNotificationsTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     object[] param = null; // TODO: Initialize to an appropriate value
     IList<ParameterTypesCodes> expected = null; // TODO: Initialize to an appropriate value
     IList<ParameterTypesCodes> actual;
     actual = target.EmailNotifications(param);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
        public void GetUserDataTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            GenralUserInfo _objGenralUserInfo = new GenralUserInfo(); // TODO: Initialize to an appropriate value
            _objGenralUserInfo.RecentUsers = new UserInfo();
            _objGenralUserInfo.RecentUsers.UserID = InsertDummyUser("tj_op");
            target.GetUserData(_objGenralUserInfo);
            Assert.AreEqual("*****@*****.**", _objGenralUserInfo.RecentUsers.UserEmail);
            Assert.AreEqual("zSpeN+GdR0Ey9VrM9QyvUA==", _objGenralUserInfo.RecentUsers.UserPassword);

            // Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
 public void GetMyFavouritesTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     object[] _MyTributes = null; // TODO: Initialize to an appropriate value
     List<GetMyTributes> expected = null; // TODO: Initialize to an appropriate value
     List<GetMyTributes> actual;
     actual = target.GetMyFavourites(_MyTributes);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void GetUserProfileTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     // TODO: Initialize to an appropriate value
     UserProfile objUserReg = new UserProfile();
     objUserReg.UserId = InsertDummyUser("tj_op");
     object[] objValue = { objUserReg };
     target.GetUserProfile(objValue);
     objUserReg = (UserProfile)objValue[0];
     Assert.AreEqual("Tajinder1", objUserReg.FirstName);//coming as "tj_op" which is UserName
     Assert.AreEqual("tj_op", objUserReg.UserName);
     //Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
    private bool OnFacebookLogin(string fbName)
    {
        GenralUserInfo _objGenralUserInfo = new GenralUserInfo();
        UserInfo objUserInfo = new UserInfo();
        objUserInfo.FacebookUid = _FacebookUid;
        objUserInfo.ApplicationType = ApplicationType;
        _objGenralUserInfo.RecentUsers = objUserInfo;
        if (objUserInfo.FacebookUid == null) return false;

        UserInfoManager umgr = new UserInfoManager();
        umgr.CheckFacebookAccountAvailability(_objGenralUserInfo);
        if (_objGenralUserInfo.RecentUsers.UserID != null && _objGenralUserInfo.RecentUsers.UserID > 0)
        {
            SetSessionValue(_objGenralUserInfo);
            return true;
        }
        return false;
    }
        public void CheckAndSendPasswordTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            GenralUserInfo _objGenralUserInfo = new GenralUserInfo(); // TODO: Initialize to an appropriate value
            _objGenralUserInfo.RecentUsers = new UserInfo();
            _objGenralUserInfo.RecentUsers.UserEmail = "*****@*****.**";
            _objGenralUserInfo.RecentUsers.UserPassword = "******";
            _objGenralUserInfo.RecentUsers.UserName = "******";

            bool _Reset = true; // TODO: Initialize to an appropriate value
            target.CheckAndSendPassword(_objGenralUserInfo, _Reset);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
 public void DeleteSessionKeyDetailsTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     string SessionID = string.Empty; // TODO: Initialize to an appropriate value
     target.DeleteSessionKeyDetails(SessionID);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
    private void CheckUserAvailablity(string UserName, string Password)
    {
        errorPwd.Visible = false;
        string uName = string.Empty;
        HiddenField hf = (HiddenField)this.FindControl("ctl00$HiddenFieldAvailability");
        UserInfoManager objUserInfoManager = new UserInfoManager();
        GenralUserInfo _objGenralUserInfo = new GenralUserInfo();
        UserInfo objUserInfo = new UserInfo();
        objUserInfo.UserName = UserName;
        objUserInfo.UserPassword = Password.ToLower().ToString();
        objUserInfo.ApplicationType = ConfigurationManager.AppSettings["ApplicationType"].ToString();
        _objGenralUserInfo.RecentUsers = objUserInfo;

        objUserInfoManager.UserLogin(_objGenralUserInfo);
        if (_objGenralUserInfo.CustomError == null)
        {
            //added the below two lines to handle the session issue
            Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", Session.SessionID));
            Response.Cookies["ASP.NET_SessionId"].Domain = "." + WebConfig.TopLevelDomain;

            SetSessionValue(_objGenralUserInfo);
            RedirectPage();
        }
        else
        {
            errorPwd.Visible = true;
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "HidePanel", "setIndicatorPassword_();", true);
        }
    }
        public void GetTributeByIDTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            int UserId = InsertDummyUser("tj_op");
            int tributeId = 0;
            GetMyTributes _objtribute = new GetMyTributes();
            _objtribute.UserId = UserId;
            object[] _param = { _objtribute, 0, 1, 2 };
            if (_objtribute.CustomError == null)
            {
                List<GetMyTributes> Mytributes = new List<GetMyTributes>();
                Mytributes = target.GetMyTributes(_param);
                Assert.AreEqual(true, Mytributes.Count > 0);
                tributeId = Mytributes[0].TributeId;

            }
            TributesUserInfo _objTributeUserinfo = new TributesUserInfo(); // TODO: Initialize to an appropriate value
            _objTributeUserinfo.Tributes = new Tributes();
            _objTributeUserinfo.Tributes.TributeId = tributeId;

            target.GetTributeByID(_objTributeUserinfo);
            Assert.AreEqual("tj", _objTributeUserinfo.Tributes.TributeName);
            Assert.AreEqual("xyz", _objTributeUserinfo.Tributes.TributeUrl);
            Assert.AreEqual("Birthday", _objTributeUserinfo.Tributes.TypeDescription);
            Assert.AreEqual("tj", _objTributeUserinfo.Tributes.TributeName);
            Assert.AreEqual("11-03-1983 AM 12:00:00", _objTributeUserinfo.Tributes.Date1.ToString());
            //Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    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 DeleteTributeAdminisTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     object[] Params = null; // TODO: Initialize to an appropriate value
     target.DeleteTributeAdminis(Params);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
    protected void doFacebookSignup()
    {
        var fbwc = new FacebookWebClient(FacebookWebContext.Current.AccessToken);
        var me = (IDictionary<string, object>)fbwc.Get("me");
        string fbName = (string)me["first_name"] + " " + (string)me["last_name"];
        string UserName = fbName.ToLower().Replace(" ", "_").Replace("'", "");/*+
            "_"+_FacebookUid.ToString()*/

        string fql = "Select current_location,pic_square,email from user where uid = " + (string)me["id"];
        JsonArray me2 = (JsonArray)fbwc.Query(fql);
        var mm = (IDictionary<string, object>)me2[0];

        Nullable<int> state = null;
        Nullable<int> country = null;
        string _UserImage = "images/bg_ProfilePhoto.gif";

        if (!string.IsNullOrEmpty((string)mm["pic_square"]))
        {
            _UserImage = (string)mm["pic_square"]; // get user image
        }
        string city = "";
        JsonObject hl = (JsonObject)mm["current_location"];
        if ((string)hl[0] != null)
        {
            city = (string)hl[0];
            UserManager usrmngr = new UserManager();
            object[] param = { (string)hl[2],(string)hl[1] };
            if (usrmngr.GetstateIdByName(param) > 0)
            {
                state = usrmngr.GetstateIdByName(param);
            }
            if (usrmngr.GetCountryIdByName((string)hl[2]) > 0)
            {
                country = usrmngr.GetCountryIdByName((string)hl[2]);
            }

        }

        string password_ = string.Empty;
        string email_ = string.Empty;  //user.proxied_email;
        string result = (string)mm["email"];
        if (!string.IsNullOrEmpty(result))
        {
            email_ = result;
            password_ = RandomPassword.Generate(8, 10);
            password_ = TributePortalSecurity.Security.EncryptSymmetric(password_);

        }
        UserRegistration objUserReg = new UserRegistration();
        TributesPortal.BusinessEntities.Users objUsers =
            new TributesPortal.BusinessEntities.Users(
             UserName, password_,
             (string)me["first_name"], (string)me["last_name"], email_,
             "", false,
             city, state, country, 1, _FacebookUid);
        objUsers.UserImage = _UserImage;
        objUserReg.Users = objUsers;

        /*System.Decimal identity = (System.Decimal)*/
        UserInfoManager umgr = new UserInfoManager();
        umgr.SavePersonalAccount(objUserReg);

        if (objUserReg.CustomError != null)
        {
            messageText.Text=string.Format("<h2>Sorry, {0}.</h2>" +
                "<h3>Those Facebook credentials are already used in some other Your Tribute Account</h3>",
                fbName);
        }
        else
        {
            SessionValue _objSessionValue = new SessionValue(objUserReg.Users.UserId,
                                                             objUserReg.Users.UserName,
                                                             objUserReg.Users.FirstName,
                                                             objUserReg.Users.LastName,
                                                             objUserReg.Users.Email,
                                                             objUserReg.UserBusiness == null ? 1 : 2,
                                                             "Basic",
                                                             objUserReg.Users.IsUsernameVisiable);
            TributesPortal.Utilities.StateManager stateManager = TributesPortal.Utilities.StateManager.Instance;
            stateManager.Add("objSessionvalue", _objSessionValue, TributesPortal.Utilities.StateManager.State.Session);

            SaveSessionInDB();
            Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", Session.SessionID));
            Response.Cookies["ASP.NET_SessionId"].Domain = "." + WebConfig.TopLevelDomain;

            showDialog.Text = "false";
            refreshPage.Text = "true";
        }
    }
 public void GetSessionDetailTest()
 {
     UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
     string SessionValues = string.Empty; // TODO: Initialize to an appropriate value
     List<SessionValue> expected = null; // TODO: Initialize to an appropriate value
     List<SessionValue> actual;
     actual = target.GetSessionDetail(SessionValues);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }