Search in sources :

Example 66 with SysSystemMappingDto

use of eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByEntityTypeNotFound.

@Test
public void testFilterByEntityTypeNotFound() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    filter.setEntityType(SystemEntityType.CONTRACT);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    assertEquals(0, attributeMappings.size());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 67 with SysSystemMappingDto

use of eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByEntityTypeAndOperationFound.

@Test
public void testFilterByEntityTypeAndOperationFound() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    filter.setEntityType(SystemEntityType.IDENTITY);
    filter.setOperationType(SystemOperationType.PROVISIONING);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    // Six is default for standard test resource
    assertEquals(6, attributeMappings.size());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 68 with SysSystemMappingDto

use of eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterBySystemId.

@Test
public void testFilterBySystemId() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    // Six is default for standard test resource
    assertEquals(6, attributeMappings.size());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 69 with SysSystemMappingDto

use of eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByNameSecond.

@Test
public void testFilterByNameSecond() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemMappingDto mappingDto = mappings.get(0);
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    filter.setName(TestHelper.ATTRIBUTE_MAPPING_FIRSTNAME);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    assertEquals(1, attributeMappings.size());
    SysSystemAttributeMappingDto attributeMappingDto = attributeMappings.get(0);
    assertEquals(TestHelper.ATTRIBUTE_MAPPING_FIRSTNAME, attributeMappingDto.getName());
    assertEquals(mappingDto.getId(), attributeMappingDto.getSystemMapping());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Example 70 with SysSystemMappingDto

use of eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto in project CzechIdMng by bcvsolutions.

the class DefaultSysSystemAttributeMappingServiceFilterTest method testFilterByPasswordAttribute.

@Test
public void testFilterByPasswordAttribute() {
    SysSystemDto system = this.getHelper().createTestResourceSystem(true, getHelper().createName());
    // Generate second system for add mapped attributes
    this.getHelper().createTestResourceSystem(true, getHelper().createName());
    SysSystemMappingFilter filterMapping = new SysSystemMappingFilter();
    filterMapping.setSystemId(system.getId());
    List<SysSystemMappingDto> mappings = systemMappingService.find(filterMapping, null).getContent();
    assertEquals(1, mappings.size());
    SysSystemAttributeMappingFilter filter = new SysSystemAttributeMappingFilter();
    filter.setSystemId(system.getId());
    filter.setPasswordAttribute(Boolean.TRUE);
    List<SysSystemAttributeMappingDto> attributeMappings = systemAttributeMappingService.find(filter, null).getContent();
    assertEquals(1, attributeMappings.size());
    SysSystemAttributeMappingDto attributeMappingDto = attributeMappings.get(0);
    assertEquals(TestHelper.ATTRIBUTE_MAPPING_PASSWORD, attributeMappingDto.getName());
    assertTrue(attributeMappingDto.isPasswordAttribute());
}
Also used : SysSystemAttributeMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter) SysSystemMappingFilter(eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter) SysSystemAttributeMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto) SysSystemMappingDto(eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Aggregations

SysSystemMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemMappingDto)359 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)269 Test (org.junit.Test)208 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)180 SysSystemAttributeMappingDto (eu.bcvsolutions.idm.acc.dto.SysSystemAttributeMappingDto)172 SysSchemaObjectClassDto (eu.bcvsolutions.idm.acc.dto.SysSchemaObjectClassDto)134 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)106 SysSystemAttributeMappingFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSystemAttributeMappingFilter)95 SysSchemaAttributeDto (eu.bcvsolutions.idm.acc.dto.SysSchemaAttributeDto)90 SysSystemMappingFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSystemMappingFilter)89 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)80 AbstractSysSyncConfigDto (eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto)70 UUID (java.util.UUID)60 SysSchemaAttributeFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSchemaAttributeFilter)58 SysRoleSystemDto (eu.bcvsolutions.idm.acc.dto.SysRoleSystemDto)56 SysSyncConfigFilter (eu.bcvsolutions.idm.acc.dto.filter.SysSyncConfigFilter)42 SystemEntityType (eu.bcvsolutions.idm.acc.domain.SystemEntityType)38 TestResource (eu.bcvsolutions.idm.acc.entity.TestResource)38 AccAccountDto (eu.bcvsolutions.idm.acc.dto.AccAccountDto)36 SysRoleSystemAttributeDto (eu.bcvsolutions.idm.acc.dto.SysRoleSystemAttributeDto)36