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());
}
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());
}
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());
}
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());
}
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());
}
Aggregations