Search in sources :

Example 6 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project flink by apache.

the class ReporterSetupTest method testSeveralReportersWithArgumentForwarding.

/**
 * Verifies that multiple reporters can be configured with all their arguments being forwarded.
 */
@Test
public void testSeveralReportersWithArgumentForwarding() {
    final Configuration config = new Configuration();
    configureReporter1(config);
    configureReporter2(config);
    final List<ReporterSetup> reporterSetups = ReporterSetup.fromConfiguration(config, null);
    Assert.assertEquals(2, reporterSetups.size());
    final Optional<ReporterSetup> reporter1Config = reporterSetups.stream().filter(c -> "reporter1".equals(c.getName())).findFirst();
    Assert.assertTrue(reporter1Config.isPresent());
    assertReporter1Configured(reporter1Config.get());
    final Optional<ReporterSetup> reporter2Config = reporterSetups.stream().filter(c -> "reporter2".equals(c.getName())).findFirst();
    Assert.assertTrue(reporter2Config.isPresent());
    assertReporter2Configured(reporter2Config.get());
}
Also used : TestingPluginManager(org.apache.flink.core.plugin.TestingPluginManager) MetricConfig(org.apache.flink.metrics.MetricConfig) MetricReporterFactory(org.apache.flink.metrics.reporter.MetricReporterFactory) Properties(java.util.Properties) IsInstanceOf.instanceOf(org.hamcrest.core.IsInstanceOf.instanceOf) Configuration(org.apache.flink.configuration.Configuration) InterceptInstantiationViaReflection(org.apache.flink.metrics.reporter.InterceptInstantiationViaReflection) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) MetricOptions(org.apache.flink.configuration.MetricOptions) MetricReporter(org.apache.flink.metrics.reporter.MetricReporter) List(java.util.List) IsCollectionContaining.hasItems(org.hamcrest.core.IsCollectionContaining.hasItems) InstantiateViaFactory(org.apache.flink.metrics.reporter.InstantiateViaFactory) ScopeFormat(org.apache.flink.runtime.metrics.scope.ScopeFormat) ConfigConstants(org.apache.flink.configuration.ConfigConstants) TestLogger(org.apache.flink.util.TestLogger) Optional(java.util.Optional) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assert(org.junit.Assert) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) TestReporter(org.apache.flink.runtime.metrics.util.TestReporter) IsMapContaining.hasEntry(org.hamcrest.collection.IsMapContaining.hasEntry) Configuration(org.apache.flink.configuration.Configuration) Test(org.junit.Test)

Example 7 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project hbase by apache.

the class TestSpaceQuotaBasicFunctioning method testDisablePolicyQuotaAndViolate.

@Test
public void testDisablePolicyQuotaAndViolate() throws Exception {
    TableName tableName = helper.createTable();
    helper.setQuotaLimit(tableName, SpaceViolationPolicy.DISABLE, 1L);
    helper.writeData(tableName, SpaceQuotaHelperForTests.ONE_MEGABYTE * 2L);
    TEST_UTIL.getConfiguration().setLong("hbase.master.quotas.region.report.retention.millis", 100);
    HMaster master = TEST_UTIL.getMiniHBaseCluster().getMaster();
    MasterQuotaManager quotaManager = master.getMasterQuotaManager();
    // Make sure the master has report for the table.
    Waiter.waitFor(TEST_UTIL.getConfiguration(), 30 * 1000, new Waiter.Predicate<Exception>() {

        @Override
        public boolean evaluate() throws Exception {
            Map<RegionInfo, Long> regionSizes = quotaManager.snapshotRegionSizes();
            List<RegionInfo> tableRegions = MetaTableAccessor.getTableRegions(TEST_UTIL.getConnection(), tableName);
            return regionSizes.containsKey(tableRegions.get(0));
        }
    });
    // Check if disabled table region report present in the map after retention period expired.
    // It should be present after retention period expired.
    final long regionSizes = quotaManager.snapshotRegionSizes().keySet().stream().filter(k -> k.getTable().equals(tableName)).count();
    Assert.assertTrue(regionSizes > 0);
}
Also used : Waiter(org.apache.hadoop.hbase.Waiter) BeforeClass(org.junit.BeforeClass) Increment(org.apache.hadoop.hbase.client.Increment) LoggerFactory(org.slf4j.LoggerFactory) Delete(org.apache.hadoop.hbase.client.Delete) StringUtils(org.apache.hadoop.util.StringUtils) TestName(org.junit.rules.TestName) Map(java.util.Map) Configuration(org.apache.hadoop.conf.Configuration) Assert.fail(org.junit.Assert.fail) ClassRule(org.junit.ClassRule) Bytes(org.apache.hadoop.hbase.util.Bytes) Before(org.junit.Before) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException) Append(org.apache.hadoop.hbase.client.Append) TableName(org.apache.hadoop.hbase.TableName) AfterClass(org.junit.AfterClass) Logger(org.slf4j.Logger) HBaseTestingUtil(org.apache.hadoop.hbase.HBaseTestingUtil) Put(org.apache.hadoop.hbase.client.Put) Assert.assertTrue(org.junit.Assert.assertTrue) HBaseClassTestRule(org.apache.hadoop.hbase.HBaseClassTestRule) LargeTests(org.apache.hadoop.hbase.testclassification.LargeTests) Test(org.junit.Test) Category(org.junit.experimental.categories.Category) AccessDeniedException(org.apache.hadoop.hbase.security.AccessDeniedException) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) Rule(org.junit.Rule) Admin(org.apache.hadoop.hbase.client.Admin) Assert.assertFalse(org.junit.Assert.assertFalse) Table(org.apache.hadoop.hbase.client.Table) MetaTableAccessor(org.apache.hadoop.hbase.MetaTableAccessor) Assert(org.junit.Assert) RegionInfo(org.apache.hadoop.hbase.client.RegionInfo) HMaster(org.apache.hadoop.hbase.master.HMaster) TableName(org.apache.hadoop.hbase.TableName) HMaster(org.apache.hadoop.hbase.master.HMaster) List(java.util.List) Waiter(org.apache.hadoop.hbase.Waiter) Map(java.util.Map) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException) AccessDeniedException(org.apache.hadoop.hbase.security.AccessDeniedException) Test(org.junit.Test)

Example 8 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project CzechIdMng by bcvsolutions.

the class IdentityFilterTest method testRecursivelyFilter.

@Test
public void testRecursivelyFilter() {
    // setting employees
    IdmIdentityDto person1 = getIdmIdentity("Klement", "Marek", "ThisIsTestName011@gemail.eu", "000000011", false);
    IdmIdentityDto person2 = getIdmIdentity("Klement", "Marek", "ThisIsTestName014@gemail.eu", "000000014", false);
    IdmIdentityDto person3 = getIdmIdentity("Klement", "Marek", "ThisIsTestName015@gemail.eu", "000000015", false);
    IdmIdentityDto person4 = getIdmIdentity("Klement", "Marek", "ThisIsTestName016@gemail.eu", "000000016", false);
    // setting structure
    IdmTreeTypeDto type1 = getHelper().createTreeType("ThisIsTestType005x");
    IdmTreeTypeDto type2 = getHelper().createTreeType("ThisIsTestType006x");
    /*
		      r1  o
		         /
		     n1 o
		       /
	       n2 o
		 */
    IdmTreeNodeDto node1 = getHelper().createTreeNode(type1, "ThisIsTestNode005", null);
    IdmTreeNodeDto node11 = getHelper().createTreeNode(type1, "ThisIsTestNode006", node1);
    IdmTreeNodeDto node12 = getHelper().createTreeNode(type1, "ThisIsTestNode007", node11);
    /*
		    r2  o
		 */
    IdmTreeNodeDto node2 = getHelper().createTreeNode(type2, "ThisIsTestNode008", null);
    // contracts
    getHelper().createContract(person1, node1);
    getHelper().createContract(person2, node11);
    getHelper().createContract(person3, node12);
    getHelper().createContract(person4, node2);
    // node1 UUID
    UUID node1id = node1.getId();
    // test
    IdmIdentityFilter filter = new IdmIdentityFilter();
    filter.setFirstName(person1.getFirstName());
    filter.setRecursively(true);
    filter.setTreeNode(node1id);
    List<IdmIdentityDto> results = identityService.find(filter, null).getContent();
    Assert.assertEquals("Wrong Recursive firstname", 3, results.size());
    Assert.assertTrue(results.stream().anyMatch(i -> i.getId().equals(person1.getId())));
    Assert.assertTrue(results.stream().anyMatch(i -> i.getId().equals(person2.getId())));
    Assert.assertTrue(results.stream().anyMatch(i -> i.getId().equals(person3.getId())));
    // 
    filter.setRecursively(false);
    results = identityService.find(filter, null).getContent();
    Assert.assertEquals("Wrong NonRecursive firstname", 1, results.size());
    Assert.assertTrue(results.stream().anyMatch(i -> i.getId().equals(person1.getId())));
}
Also used : IdmTreeTypeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeTypeDto) ZonedDateTime(java.time.ZonedDateTime) IdmIdentityContract(eu.bcvsolutions.idm.core.model.entity.IdmIdentityContract) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) Autowired(org.springframework.beans.factory.annotation.Autowired) FilterManager(eu.bcvsolutions.idm.core.api.repository.filter.FilterManager) ArrayList(java.util.ArrayList) IdmTreeTypeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeTypeDto) DataFilter(eu.bcvsolutions.idm.core.api.dto.filter.DataFilter) Lists(com.google.common.collect.Lists) IdmIdentityFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter) DefaultManagersFilter(eu.bcvsolutions.idm.core.model.repository.filter.DefaultManagersFilter) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) EntityUtils(eu.bcvsolutions.idm.core.api.utils.EntityUtils) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) Assert.assertNotNull(org.junit.Assert.assertNotNull) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) MultiValueMap(org.springframework.util.MultiValueMap) Test(org.junit.Test) UUID(java.util.UUID) Field(java.lang.reflect.Field) Page(org.springframework.data.domain.Page) IdentityState(eu.bcvsolutions.idm.core.api.domain.IdentityState) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) IntrospectionException(java.beans.IntrospectionException) InvocationTargetException(java.lang.reflect.InvocationTargetException) FilterBuilder(eu.bcvsolutions.idm.core.api.repository.filter.FilterBuilder) DefaultSubordinatesFilter(eu.bcvsolutions.idm.core.model.repository.filter.DefaultSubordinatesFilter) List(java.util.List) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) DefaultContractByManagerFilter(eu.bcvsolutions.idm.core.model.repository.filter.DefaultContractByManagerFilter) IdmIdentity_(eu.bcvsolutions.idm.core.model.entity.IdmIdentity_) IdmIdentityContractFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityContractFilter) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) Assert(org.junit.Assert) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) LinkedMultiValueMap(org.springframework.util.LinkedMultiValueMap) Transactional(org.springframework.transaction.annotation.Transactional) IdmIdentityFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter) IdmTreeNodeDto(eu.bcvsolutions.idm.core.api.dto.IdmTreeNodeDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) UUID(java.util.UUID) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 9 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project CzechIdMng by bcvsolutions.

the class IdentityAddRoleBulkActionIntegrationTest method processBulkActionByIdsWithoutValidityIsGiven.

@Test
public void processBulkActionByIdsWithoutValidityIsGiven() {
    IdmIdentityDto identityOne = getHelper().createIdentity((GuardedString) null);
    IdmIdentityContractDto primeContract = getHelper().getPrimeContract(identityOne);
    IdmIdentityContractDto otherValidContract = getHelper().createContract(identityOne, null, LocalDate.now().plusDays(1), LocalDate.now().plusDays(2));
    IdmIdentityContractDto otherInvalidContract = getHelper().createContract(identityOne, null, null, LocalDate.now().minusDays(1));
    IdmRoleDto roleOne = getHelper().createRole();
    IdmBulkActionDto bulkAction = this.findBulkAction(IdmIdentity.class, IdentityAddRoleBulkAction.NAME);
    bulkAction.setIdentifiers(Sets.newHashSet(identityOne.getId()));
    Map<String, Object> properties = new HashMap<>();
    properties.put(IdentityAddRoleBulkAction.ROLE_CODE, Lists.newArrayList(roleOne.getId().toString()));
    properties.put(IdentityAddRoleBulkAction.PRIMARY_CONTRACT_CODE, Boolean.FALSE);
    properties.put(IdentityAddRoleBulkAction.APPROVE_CODE, Boolean.FALSE);
    bulkAction.setProperties(properties);
    IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
    checkResultLrt(processAction, 2l, null, null);
    List<IdmIdentityContractDto> contracts = identityContractService.findAllByIdentity(identityOne.getId());
    // +1 primary vithout validity is set
    Assert.assertEquals(3, contracts.size());
    Assert.assertTrue(identityRoleService.findAllByContract(otherInvalidContract.getId()).isEmpty());
    List<IdmIdentityRoleDto> identityRoles = identityRoleService.findAllByIdentity(identityOne.getId());
    Assert.assertEquals(2, identityRoles.size());
    Assert.assertTrue(identityRoles.stream().anyMatch(ir -> ir.getRole().equals(roleOne.getId()) && ir.getIdentityContract().equals(primeContract.getId()) && ir.getValidFrom() == null && ir.getValidTill() == null));
    Assert.assertTrue(identityRoles.stream().anyMatch(ir -> ir.getRole().equals(roleOne.getId()) && ir.getIdentityContract().equals(otherValidContract.getId()) && ir.getValidFrom().equals(otherValidContract.getValidFrom()) && ir.getValidTill() == null));
}
Also used : IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmIdentityContract(eu.bcvsolutions.idm.core.model.entity.IdmIdentityContract) Autowired(org.springframework.beans.factory.annotation.Autowired) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) HashMap(java.util.HashMap) IdentityBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdentityBasePermission) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) IdmBasePermission(eu.bcvsolutions.idm.core.security.api.domain.IdmBasePermission) Lists(com.google.common.collect.Lists) IdmIdentityFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter) Map(java.util.Map) After(org.junit.After) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) Before(org.junit.Before) IdmIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService) IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) Assert.assertNotNull(org.junit.Assert.assertNotNull) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) Set(java.util.Set) Test(org.junit.Test) IdmRoleRequest(eu.bcvsolutions.idm.core.model.entity.IdmRoleRequest) UUID(java.util.UUID) Sets(com.google.common.collect.Sets) List(java.util.List) Assert.assertNull(org.junit.Assert.assertNull) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) LocalDate(java.time.LocalDate) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) HashMap(java.util.HashMap) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Example 10 with Assert.assertTrue

use of org.junit.Assert.assertTrue in project CzechIdMng by bcvsolutions.

the class DefaultIdmRoleRequestServiceIntegrationTest method testExecuteRequestForSameAutomaticRole.

@Test
public void testExecuteRequestForSameAutomaticRole() {
    IdmRoleDto role = getHelper().createRole();
    IdmAutomaticRoleAttributeDto automaticRole = getHelper().createAutomaticRole(role.getId());
    IdmIdentityDto identity = getHelper().createIdentity((GuardedString) null);
    IdmIdentityContractDto primeContract = getHelper().getPrimeContract(identity);
    // 
    // create two requests
    IdmRoleRequestDto requestOne = new IdmRoleRequestDto();
    requestOne.setApplicant(identity.getId());
    requestOne.setExecuteImmediately(true);
    requestOne.setRequestedByType(RoleRequestedByType.MANUALLY);
    requestOne.setState(RoleRequestState.EXECUTED);
    requestOne = roleRequestService.save(requestOne);
    Assert.assertEquals(RoleRequestState.CONCEPT, requestOne.getState());
    IdmConceptRoleRequestDto concept = new IdmConceptRoleRequestDto();
    concept.setRoleRequest(requestOne.getId());
    concept.setState(RoleRequestState.EXECUTED);
    concept.setOperation(ConceptRoleRequestOperation.ADD);
    concept.setRole(role.getId());
    concept.setAutomaticRole(automaticRole.getId());
    concept.setIdentityContract(primeContract.getId());
    concept = conceptRoleRequestService.save(concept);
    Assert.assertEquals(RoleRequestState.CONCEPT, concept.getState());
    // 
    // create two requests
    IdmRoleRequestDto requestTwo = new IdmRoleRequestDto();
    requestTwo.setApplicant(identity.getId());
    requestTwo.setExecuteImmediately(true);
    requestTwo.setRequestedByType(RoleRequestedByType.MANUALLY);
    requestTwo.setState(RoleRequestState.EXECUTED);
    requestTwo = roleRequestService.save(requestTwo);
    Assert.assertEquals(RoleRequestState.CONCEPT, requestTwo.getState());
    concept = new IdmConceptRoleRequestDto();
    concept.setRoleRequest(requestTwo.getId());
    concept.setState(RoleRequestState.EXECUTED);
    concept.setOperation(ConceptRoleRequestOperation.ADD);
    concept.setRole(role.getId());
    concept.setAutomaticRole(automaticRole.getId());
    concept.setIdentityContract(primeContract.getId());
    concept = conceptRoleRequestService.save(concept);
    Assert.assertEquals(RoleRequestState.CONCEPT, concept.getState());
    getHelper().startRequestInternal(requestOne, true, true);
    requestOne = roleRequestService.get(requestOne.getId());
    Assert.assertEquals(RoleRequestState.EXECUTED, requestOne.getState());
    getHelper().startRequestInternal(requestTwo, true, true);
    requestTwo = roleRequestService.get(requestTwo.getId());
    Assert.assertEquals(RoleRequestState.EXECUTED, requestTwo.getState());
    // 
    List<IdmIdentityRoleDto> assignedRoles = identityRoleService.findAllByIdentity(identity.getId());
    Assert.assertEquals(1, assignedRoles.size());
    Assert.assertTrue(assignedRoles.stream().allMatch(ir -> ir.getAutomaticRole().equals(automaticRole.getId())));
}
Also used : IdmRoleRequestByIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestByIdentityDto) IdmConceptRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmConceptRoleRequestService) IdmRequestIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRequestIdentityRoleDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmFormAttributeDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormAttributeDto) RoleRequestException(eu.bcvsolutions.idm.core.api.exception.RoleRequestException) Autowired(org.springframework.beans.factory.annotation.Autowired) FormService(eu.bcvsolutions.idm.core.eav.api.service.FormService) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) IdmRoleRequestService(eu.bcvsolutions.idm.core.api.service.IdmRoleRequestService) CoreGroupPermission(eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission) IdmFormValueDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormValueDto) IdmRequestIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmRequestIdentityRoleService) Map(java.util.Map) After(org.junit.After) ModuleService(eu.bcvsolutions.idm.core.api.service.ModuleService) SecurityContextHolder(org.springframework.security.core.context.SecurityContextHolder) IdmIdentityContractService(eu.bcvsolutions.idm.core.api.service.IdmIdentityContractService) Collection(java.util.Collection) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) PriorityType(eu.bcvsolutions.idm.core.api.domain.PriorityType) Serializable(java.io.Serializable) GrantedAuthority(org.springframework.security.core.GrantedAuthority) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) EventConfiguration(eu.bcvsolutions.idm.core.api.config.domain.EventConfiguration) LocalDate(java.time.LocalDate) IdmRoleRequestFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRoleRequestFilter) RoleRequestEventType(eu.bcvsolutions.idm.core.model.event.RoleRequestEvent.RoleRequestEventType) RoleRequestApprovalProcessor(eu.bcvsolutions.idm.core.model.event.processor.role.RoleRequestApprovalProcessor) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmAttachmentDto(eu.bcvsolutions.idm.core.ecm.api.dto.IdmAttachmentDto) FutureTask(java.util.concurrent.FutureTask) RoleRequestedByType(eu.bcvsolutions.idm.core.api.domain.RoleRequestedByType) HashMap(java.util.HashMap) IdmJwtAuthentication(eu.bcvsolutions.idm.core.security.api.domain.IdmJwtAuthentication) PersistentType(eu.bcvsolutions.idm.core.eav.api.domain.PersistentType) Lists(com.google.common.collect.Lists) IdmIdentityRole(eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole) IdmAuthorityUtils(eu.bcvsolutions.idm.core.security.api.utils.IdmAuthorityUtils) ImmutableList(com.google.common.collect.ImmutableList) AbstractCoreWorkflowIntegrationTest(eu.bcvsolutions.idm.core.AbstractCoreWorkflowIntegrationTest) IdmConceptRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto) Qualifier(org.springframework.beans.factory.annotation.Qualifier) IdmFormInstanceDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormInstanceDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) Before(org.junit.Before) IdmIdentityRoleService(eu.bcvsolutions.idm.core.api.service.IdmIdentityRoleService) SchedulerConfiguration(eu.bcvsolutions.idm.core.scheduler.api.config.SchedulerConfiguration) IdmIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityRoleFilter) Executor(java.util.concurrent.Executor) Assert.assertNotNull(org.junit.Assert.assertNotNull) AttachmentManager(eu.bcvsolutions.idm.core.ecm.api.service.AttachmentManager) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmRoleService(eu.bcvsolutions.idm.core.api.service.IdmRoleService) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) RoleRequestState(eu.bcvsolutions.idm.core.api.domain.RoleRequestState) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) IdmRoleFormAttributeService(eu.bcvsolutions.idm.core.api.service.IdmRoleFormAttributeService) IdmFormDefinitionDto(eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto) Assert.assertNull(org.junit.Assert.assertNull) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) RoleRequestEvent(eu.bcvsolutions.idm.core.model.event.RoleRequestEvent) IdmRequestIdentityRoleFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmRequestIdentityRoleFilter) IdmGroupPermission(eu.bcvsolutions.idm.core.security.api.domain.IdmGroupPermission) Assert(org.junit.Assert) ConceptRoleRequestOperation(eu.bcvsolutions.idm.core.api.domain.ConceptRoleRequestOperation) Assert.assertEquals(org.junit.Assert.assertEquals) Transactional(org.springframework.transaction.annotation.Transactional) IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) IdmConceptRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmConceptRoleRequestDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) IdmIdentityRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto) IdmIdentityContractDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto) IdmRoleRequestDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleRequestDto) IdmAutomaticRoleAttributeDto(eu.bcvsolutions.idm.core.api.dto.IdmAutomaticRoleAttributeDto) AbstractCoreWorkflowIntegrationTest(eu.bcvsolutions.idm.core.AbstractCoreWorkflowIntegrationTest) Test(org.junit.Test)

Aggregations

Assert (org.junit.Assert)88 Assert.assertTrue (org.junit.Assert.assertTrue)88 Test (org.junit.Test)88 Assert.assertEquals (org.junit.Assert.assertEquals)84 List (java.util.List)82 Before (org.junit.Before)67 UUID (java.util.UUID)55 Assert.assertFalse (org.junit.Assert.assertFalse)54 Autowired (org.springframework.beans.factory.annotation.Autowired)53 Assert.assertNotNull (org.junit.Assert.assertNotNull)52 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)51 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)51 IdmIdentityContractDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto)49 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)48 Transactional (org.springframework.transaction.annotation.Transactional)46 After (org.junit.After)44 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)42 ApplicationContext (org.springframework.context.ApplicationContext)38 IdmIdentityRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto)37 ResultCodeException (eu.bcvsolutions.idm.core.api.exception.ResultCodeException)36