Search in sources :

Example 1 with EmailProvider

use of com.nexblocks.authguard.external.email.EmailProvider in project AuthGuard by AuthGuard.

the class VerificationSubscriberTest method setup.

@BeforeEach
void setup() {
    emailProvider = Mockito.mock(EmailProvider.class);
    accountTokensRepository = Mockito.mock(AccountTokensRepository.class);
    final ConfigContext configContext = Mockito.mock(ConfigContext.class);
    final ImmutableVerificationConfig verificationConfig = ImmutableVerificationConfig.builder().emailVerificationLife("1d").build();
    Mockito.when(configContext.asConfigBean(ImmutableVerificationConfig.class)).thenReturn(verificationConfig);
    verificationSubscriber = new VerificationSubscriber(emailProvider, accountTokensRepository, configContext);
}
Also used : EmailProvider(com.nexblocks.authguard.external.email.EmailProvider) AccountTokensRepository(com.nexblocks.authguard.dal.cache.AccountTokensRepository) ConfigContext(com.nexblocks.authguard.config.ConfigContext) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ConfigContext (com.nexblocks.authguard.config.ConfigContext)1 AccountTokensRepository (com.nexblocks.authguard.dal.cache.AccountTokensRepository)1 EmailProvider (com.nexblocks.authguard.external.email.EmailProvider)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1