Search in sources :

Example 1 with ConfigurationServiceImpl

use of org.simbasecurity.core.service.config.ConfigurationServiceImpl in project simba-os by cegeka.

the class UserEntityTest method setUp.

@Before
public void setUp() {
    implantMock(UserValidator.class);
    PasswordValidator mockPasswordValidator = implantMock(PasswordValidator.class);
    doThrow(new SimbaException(PASSWORD_INVALID_LENGTH)).when(mockPasswordValidator).validatePassword(INVALID_PASSWORD);
    ConfigurationServiceImpl configurationServiceMock = implantMock(ConfigurationServiceImpl.class);
    when(configurationServiceMock.getValue(SimbaConfigurationParameter.DEFAULT_PASSWORD)).thenReturn(DEFAULT_PASSWORD);
    user = new UserEntity(USERNAME, null, null, null, Language.en_US, Status.ACTIVE, true, true);
}
Also used : SimbaException(org.simbasecurity.core.exception.SimbaException) PasswordValidator(org.simbasecurity.core.domain.validator.PasswordValidator) ConfigurationServiceImpl(org.simbasecurity.core.service.config.ConfigurationServiceImpl) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 PasswordValidator (org.simbasecurity.core.domain.validator.PasswordValidator)1 SimbaException (org.simbasecurity.core.exception.SimbaException)1 ConfigurationServiceImpl (org.simbasecurity.core.service.config.ConfigurationServiceImpl)1