public void ToBoolean() { Assert.IsTrue(LdapStateUtils.ToBoolean(LdapState.LdapConnectionSuccess)); Assert.IsTrue(LdapStateUtils.ToBoolean(LdapState.LdapLibraryInitSuccess)); Assert.IsTrue(LdapStateUtils.ToBoolean(LdapState.LdapUserManipulatorSuccess)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapChangeUserPasswordError)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapConnectionError)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapCreateUserError)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapDeleteUserError)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapGenericError)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapLibraryInitError)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapModifyUserAttributeError)); Assert.IsFalse(LdapStateUtils.ToBoolean(LdapState.LdapSearchUserError)); }
public bool Connect() { _ldapCurrentState = _connector.Connect(); return(LdapStateUtils.ToBoolean(_ldapCurrentState)); }
public bool Connect(NetworkCredential credential) { _ldapCurrentState = _connector.Connect(credential); return(LdapStateUtils.ToBoolean(_ldapCurrentState)); }
public bool SearchAllNodes(IList <string> otherReturnedAttributes, out IList <ILdapUser> searchResult) { _ldapCurrentState = _searcher.SearchAllNodes(otherReturnedAttributes, out searchResult); return(LdapStateUtils.ToBoolean(_ldapCurrentState)); }
public bool ChangeUserPassword(ILdapUser user, string newPwd) { _ldapCurrentState = _manageLdapUser.ChangeUserPassword(user, newPwd); return(LdapStateUtils.ToBoolean(_ldapCurrentState)); }
public bool ModifyUserAttribute(DirectoryAttributeOperation operationType, ILdapUser user, string attributeName, string attributeValue) { _ldapCurrentState = _manageLdapUser.ModifyUserAttribute(operationType, user, attributeName, attributeValue); return(LdapStateUtils.ToBoolean(_ldapCurrentState)); }
public bool DeleteUser(ILdapUser user) { _ldapCurrentState = _manageLdapUser.DeleteUser(user); return(LdapStateUtils.ToBoolean(_ldapCurrentState)); }
public bool CreateUser(ILdapUser newUser) { _ldapCurrentState = _manageLdapUser.CreateUser(newUser); return(LdapStateUtils.ToBoolean(_ldapCurrentState)); }