use of com.nexblocks.authguard.service.RolesService in project AuthGuard by AuthGuard.
the class AccountsServiceImplTest method setup.
@BeforeEach
void setup() {
accountsRepository = Mockito.mock(AccountsRepository.class);
permissionsService = Mockito.mock(PermissionsService.class);
rolesService = Mockito.mock(RolesService.class);
idempotencyService = Mockito.mock(IdempotencyService.class);
messageBus = Mockito.mock(MessageBus.class);
final ConfigContext configContext = Mockito.mock(ConfigContext.class);
final AccountConfig accountConfig = AccountConfig.builder().verifyEmail(true).verifyPhoneNumber(true).defaultRolesByDomain(ImmutableMap.of("unit", Collections.singleton("def-role"), "main", Collections.singleton("not-def-role"))).build();
Mockito.when(configContext.asConfigBean(AccountConfig.class)).thenReturn(accountConfig);
serviceMapper = new ServiceMapperImpl();
accountService = new AccountsServiceImpl(accountsRepository, permissionsService, rolesService, idempotencyService, serviceMapper, messageBus, configContext);
}
Aggregations