public void IsPasswordExpired_2()
        {
            //Arrange
            _passwordConfiguration.PasswordPolicy = true;
            _passwordConfiguration.ExpirationDays = -1;
            _user.SetPassword("password");

            _controllerInstance = new AgencyPasswordPolicy(_passwordConfiguration);

            //Act
            var result = _controllerInstance.IsPasswordExpired(_user);

            //Assert
            Assert.True(result);
        }
        public void AgencyPasswordPolicy_CheckPasswordDate()
        {
            UserNew userdetails = new UserNew();

            passwordConfiguration = new PasswordConfigurationNew();
            passwordConfiguration.PasswordPolicy = true;
            passwordConfiguration.MaximumLength  = 15;
            controllerInstance = new AgencyPasswordPolicy(passwordConfiguration);
            try
            {
                controllerInstance.IsPasswordExpired(userdetails);
                Assert.Fail();
            }
            catch (Exception exception)
            {
                Assert.IsNotNull(exception);
            }
        }