use of eu.bcvsolutions.idm.acc.domain.SystemEntityType in project CzechIdMng by bcvsolutions.
the class DefaultSysProvisioningArchiveServiceIntegrationTest method systemIdFilterTest.
@Test
@Transactional
public void systemIdFilterTest() {
SystemEntityType entityType = SystemEntityType.IDENTITY;
SysSystemDto system1 = createSystem();
SysSystemDto system2 = createSystem();
SysProvisioningArchiveDto provisioningArchive1 = createProvisioningArchive(entityType, system1);
SysProvisioningArchiveDto provisioningArchive2 = createProvisioningArchive(entityType, system1);
SysProvisioningArchiveDto provisioningArchive3 = createProvisioningArchive(entityType, system2);
SysProvisioningOperationFilter filter = new SysProvisioningOperationFilter();
filter.setSystemId(system1.getId());
Page<SysProvisioningArchiveDto> result = service.find(filter, null);
assertEquals(2, result.getTotalElements());
assertTrue(result.getContent().contains(provisioningArchive1));
assertTrue(result.getContent().contains(provisioningArchive2));
assertFalse(result.getContent().contains(provisioningArchive3));
}
Aggregations