Example #1
0
 public void ChangePassword_Test1()
 {
     try
     {
         puser_testObject.ID               = BUser.CurrentUser.ID;
         puser_testObject.Active           = true;
         puser_testObject.UserName         = BUser.CurrentUser.UserName;
         puser_testObject.Password         = "******";
         puser_testObject.ConfirmPassword  = "******";
         puser_testObject.IsPasswodChanged = true;
         puser_testObject.RoleID           = BUser.CurrentUser.Role.ID;
         puser_testObject.PersonID         = BUser.CurrentUser.Person.ID;
         ClearSession();
         busUser.EditUser(puser_testObject);
         ClearSession();
         bool sucs = busUser.ChangePassword("qqqqqq", "ddddd", "ddddd");
         Assert.IsTrue(sucs);
         GTSMembershipProvider mmm = new GTSMembershipProvider();
         bool validate             = mmm.ValidateUser(BUser.CurrentUser.UserName, "ddddd");
         Assert.IsTrue(validate);
     }
     catch (UIValidationExceptions ex)
     {
         Assert.Fail(ex.Message);
     }
     finally
     {
         busUser.SaveChanges(user_testObject, UIActionType.DELETE);
     }
 }
Example #2
0
        public bool IsAuthenticate(string username, string pass)
        {
            try
            {
                GTSMembershipProvider provider = new GTSMembershipProvider();
                return(provider.ValidateUser(username, pass));
            }
            catch (Exception ex)
            {
                BaseBusiness <Entity> .LogException(ex);

                throw ex;
            }
        }