Search in sources :

Example 1 with AccountLocksService

use of com.nexblocks.authguard.service.AccountLocksService in project AuthGuard by AuthGuard.

the class AuthenticationServiceImplTest method setup.

@BeforeAll
void setup() {
    exchangeService = Mockito.mock(ExchangeService.class);
    accountLocksService = Mockito.mock(AccountLocksService.class);
    final ConfigContext configContext = Mockito.mock(ConfigContext.class);
    final AuthenticationConfig config = AuthenticationConfig.builder().generateToken("accessToken").build();
    Mockito.when(exchangeService.supportsExchange("basic", "accessToken")).thenReturn(true);
    Mockito.when(configContext.asConfigBean(AuthenticationConfig.class)).thenReturn(config);
    authenticationService = new AuthenticationServiceImpl(exchangeService, accountLocksService, configContext);
}
Also used : ExchangeService(com.nexblocks.authguard.service.ExchangeService) AccountLocksService(com.nexblocks.authguard.service.AccountLocksService) AuthenticationConfig(com.nexblocks.authguard.service.config.AuthenticationConfig) ConfigContext(com.nexblocks.authguard.config.ConfigContext) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

ConfigContext (com.nexblocks.authguard.config.ConfigContext)1 AccountLocksService (com.nexblocks.authguard.service.AccountLocksService)1 ExchangeService (com.nexblocks.authguard.service.ExchangeService)1 AuthenticationConfig (com.nexblocks.authguard.service.config.AuthenticationConfig)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1