public void SetPasswordExpired_ToTrue_ChangesProperty() { // arrange var userName = _generator.RandomName; _installer.Install(userName, _generator.RandomName); // act _shell.SetPasswordExpired(userName, true); // assert UserHelper.GetPasswordExpired(userName).Should().BeTrue(); }
private void Update(ConfigurationCache config) { if (config.AccountDisabled.HasValue) { _shell.SetAccountDisabled(_user.Name, config.AccountDisabled.Value); } if (config.Password != null) { _shell.ChangePassword(_user.Name, config.Password); } if (config.IsVisible.HasValue) { _shell.SetUserVisibility(_user.Name, config.IsVisible.Value); } if (config.PasswordCanBeChangedByUser.HasValue) { _shell.SetPasswordCanBeChangedByUser(_user.Name, config.PasswordCanBeChangedByUser.Value); } if (config.PasswordRequired.HasValue) { _shell.SetPasswordRequired(_user.Name, config.PasswordRequired.Value); } if (config.PasswordCanExpire.HasValue) { _shell.SetPasswordCanExpire(_user.Name, config.PasswordCanExpire.Value); } if (config.PasswordExpired.HasValue) { _shell.SetPasswordExpired(_user.Name, config.PasswordExpired.Value); } if (config.Desription != null) { _shell.SetUserDescription(_user.Name, config.Desription); } if (config.FullName != null) { _shell.SetUserFullName(_user.Name, config.FullName); } }