Search in sources :

Example 81 with Assert.assertEquals

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

the class AbstractSchedulableStatefulExecutorIntegrationTest method testContinueWithRequiresNewAsync.

@Test
public void testContinueWithRequiresNewAsync() throws Exception {
    getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, true);
    try {
        List<IdmIdentityDto> identities = createTestIdentities(3);
        // 
        TestIdentityIntegrationExecutor executor = new TestIdentityIntegrationExecutor();
        executor.dtos = identities;
        executor.continueOnException = true;
        executor.requireNewTransaction = true;
        String changeLastName = "last-name-update";
        executor.changeLastName = changeLastName;
        executor.exceptionOnItem = 2;
        // 
        longRunningTaskManager.execute(executor);
        Function<String, Boolean> continueFunction = res -> {
            return longRunningTaskManager.getLongRunningTask(executor).getResultState() != OperationState.EXECUTED;
        };
        getHelper().waitForResult(continueFunction);
        // 
        IdmLongRunningTaskDto taskDto = longRunningTaskService.get(executor.getLongRunningTaskId(), getContext());
        Assert.assertEquals(3, taskDto.getCount().intValue());
        Assert.assertEquals(2, taskDto.getSuccessItemCount().intValue());
        Assert.assertEquals(1, taskDto.getFailedItemCount().intValue());
    // TODO: asynchronously => in new transaction each item => commited. How to solve it?
    } finally {
        getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, false);
    }
}
Also used : IdmProcessedTaskItemDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmProcessedTaskItemDto) Autowired(org.springframework.beans.factory.annotation.Autowired) SchedulerTestUtils(eu.bcvsolutions.idm.test.api.utils.SchedulerTestUtils) Function(java.util.function.Function) IdmProcessedTaskItemService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmProcessedTaskItemService) ArrayList(java.util.ArrayList) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) Pageable(org.springframework.data.domain.Pageable) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) IdmScheduledTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmScheduledTaskDto) SchedulerConfiguration(eu.bcvsolutions.idm.core.scheduler.api.config.SchedulerConfiguration) CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) AbstractSchedulableStatefulExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.AbstractSchedulableStatefulExecutor) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) PageRequest(org.springframework.data.domain.PageRequest) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) SchedulableTaskExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.SchedulableTaskExecutor) IdmScheduledTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmScheduledTaskService) List(java.util.List) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) TransactionStatus(org.springframework.transaction.TransactionStatus) Optional(java.util.Optional) TransactionCallback(org.springframework.transaction.support.TransactionCallback) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) Assert(org.junit.Assert) PageImpl(org.springframework.data.domain.PageImpl) Assert.assertEquals(org.junit.Assert.assertEquals) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 82 with Assert.assertEquals

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

the class AbstractSchedulableStatefulExecutorIntegrationTest method testContinueWithoutRequiresNewAsync.

@Test
public void testContinueWithoutRequiresNewAsync() throws Exception {
    getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, true);
    try {
        List<IdmIdentityDto> identities = createTestIdentities(3);
        // 
        TestIdentityIntegrationExecutor executor = new TestIdentityIntegrationExecutor();
        executor.dtos = identities;
        executor.continueOnException = true;
        executor.requireNewTransaction = false;
        String changeLastName = "last-name-update";
        executor.changeLastName = changeLastName;
        executor.exceptionOnItem = 2;
        // 
        longRunningTaskManager.execute(executor);
        // wait for start (with optimization, when task was already processed)
        Function<String, Boolean> continueFunction = res -> {
            return longRunningTaskManager.getLongRunningTask(executor).getResultState() != OperationState.EXECUTED;
        };
        getHelper().waitForResult(continueFunction);
        // 
        Assert.assertNotNull(executor.getLongRunningTaskId());
        IdmLongRunningTaskDto taskDto = longRunningTaskService.get(executor.getLongRunningTaskId(), getContext());
        Assert.assertEquals(3, taskDto.getCount().intValue());
        Assert.assertEquals(2, taskDto.getSuccessItemCount().intValue());
        Assert.assertEquals(1, taskDto.getFailedItemCount().intValue());
    // TODO: asynchronously => in new transaction each item => commited. How to solve it?
    } finally {
        getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, false);
    }
}
Also used : IdmProcessedTaskItemDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmProcessedTaskItemDto) Autowired(org.springframework.beans.factory.annotation.Autowired) SchedulerTestUtils(eu.bcvsolutions.idm.test.api.utils.SchedulerTestUtils) Function(java.util.function.Function) IdmProcessedTaskItemService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmProcessedTaskItemService) ArrayList(java.util.ArrayList) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) Pageable(org.springframework.data.domain.Pageable) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) IdmScheduledTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmScheduledTaskDto) SchedulerConfiguration(eu.bcvsolutions.idm.core.scheduler.api.config.SchedulerConfiguration) CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) AbstractSchedulableStatefulExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.AbstractSchedulableStatefulExecutor) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) PageRequest(org.springframework.data.domain.PageRequest) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) SchedulableTaskExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.SchedulableTaskExecutor) IdmScheduledTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmScheduledTaskService) List(java.util.List) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) TransactionStatus(org.springframework.transaction.TransactionStatus) Optional(java.util.Optional) TransactionCallback(org.springframework.transaction.support.TransactionCallback) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) Assert(org.junit.Assert) PageImpl(org.springframework.data.domain.PageImpl) Assert.assertEquals(org.junit.Assert.assertEquals) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 83 with Assert.assertEquals

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

the class AbstractSchedulableStatefulExecutorIntegrationTest method testNotContinueWithoutRequiresNewAsync.

@Test
public void testNotContinueWithoutRequiresNewAsync() throws Exception {
    getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, true);
    try {
        List<IdmIdentityDto> identities = createTestIdentities(3);
        // 
        TestIdentityIntegrationExecutor executor = new TestIdentityIntegrationExecutor();
        executor.dtos = identities;
        executor.continueOnException = false;
        executor.requireNewTransaction = false;
        String changeLastName = "last-name-update";
        executor.changeLastName = changeLastName;
        executor.exceptionOnItem = 2;
        // 
        longRunningTaskManager.execute(executor);
        Function<String, Boolean> continueFunction = res -> {
            return longRunningTaskManager.getLongRunningTask(executor).getResultState() != OperationState.EXCEPTION;
        };
        getHelper().waitForResult(continueFunction);
        // 
        IdmLongRunningTaskDto taskDto = longRunningTaskService.get(executor.getLongRunningTaskId(), getContext());
        Assert.assertEquals(3, taskDto.getCount().intValue());
        Assert.assertEquals(1, taskDto.getSuccessItemCount().intValue());
        Assert.assertEquals(1, taskDto.getFailedItemCount().intValue());
    // TODO: asynchronously => in new transaction each item => commited. How to solve it?
    } finally {
        getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, false);
    }
}
Also used : IdmProcessedTaskItemDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmProcessedTaskItemDto) Autowired(org.springframework.beans.factory.annotation.Autowired) SchedulerTestUtils(eu.bcvsolutions.idm.test.api.utils.SchedulerTestUtils) Function(java.util.function.Function) IdmProcessedTaskItemService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmProcessedTaskItemService) ArrayList(java.util.ArrayList) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) Pageable(org.springframework.data.domain.Pageable) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) IdmScheduledTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmScheduledTaskDto) SchedulerConfiguration(eu.bcvsolutions.idm.core.scheduler.api.config.SchedulerConfiguration) CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) AbstractSchedulableStatefulExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.AbstractSchedulableStatefulExecutor) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) PageRequest(org.springframework.data.domain.PageRequest) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) SchedulableTaskExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.SchedulableTaskExecutor) IdmScheduledTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmScheduledTaskService) List(java.util.List) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) TransactionStatus(org.springframework.transaction.TransactionStatus) Optional(java.util.Optional) TransactionCallback(org.springframework.transaction.support.TransactionCallback) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) Assert(org.junit.Assert) PageImpl(org.springframework.data.domain.PageImpl) Assert.assertEquals(org.junit.Assert.assertEquals) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 84 with Assert.assertEquals

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

the class AbstractSchedulableStatefulExecutorIntegrationTest method testNotContinueWithRequiresNewAsync.

@Test
public void testNotContinueWithRequiresNewAsync() throws Exception {
    getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, true);
    try {
        List<IdmIdentityDto> identities = createTestIdentities(3);
        // 
        TestIdentityIntegrationExecutor executor = new TestIdentityIntegrationExecutor();
        executor.dtos = identities;
        executor.continueOnException = false;
        executor.requireNewTransaction = true;
        String changeLastName = "last-name-update";
        executor.changeLastName = changeLastName;
        executor.exceptionOnItem = 2;
        // 
        longRunningTaskManager.execute(executor);
        Function<String, Boolean> continueFunction = res -> {
            return longRunningTaskManager.getLongRunningTask(executor).getResultState() != OperationState.EXCEPTION;
        };
        getHelper().waitForResult(continueFunction);
        // 
        IdmLongRunningTaskDto taskDto = longRunningTaskService.get(executor.getLongRunningTaskId(), getContext());
        Assert.assertEquals(3, taskDto.getCount().intValue());
        Assert.assertEquals(1, taskDto.getSuccessItemCount().intValue());
        Assert.assertEquals(1, taskDto.getFailedItemCount().intValue());
    // TODO: asynchronously => in new transaction each item => commited. How to solve it?
    } finally {
        getHelper().setConfigurationValue(SchedulerConfiguration.PROPERTY_TASK_ASYNCHRONOUS_ENABLED, false);
    }
}
Also used : IdmProcessedTaskItemDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmProcessedTaskItemDto) Autowired(org.springframework.beans.factory.annotation.Autowired) SchedulerTestUtils(eu.bcvsolutions.idm.test.api.utils.SchedulerTestUtils) Function(java.util.function.Function) IdmProcessedTaskItemService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmProcessedTaskItemService) ArrayList(java.util.ArrayList) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) Pageable(org.springframework.data.domain.Pageable) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) IdmScheduledTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmScheduledTaskDto) SchedulerConfiguration(eu.bcvsolutions.idm.core.scheduler.api.config.SchedulerConfiguration) CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) LongRunningTaskManager(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskManager) AbstractSchedulableStatefulExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.AbstractSchedulableStatefulExecutor) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) Assert.assertTrue(org.junit.Assert.assertTrue) PageRequest(org.springframework.data.domain.PageRequest) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) Test(org.junit.Test) UUID(java.util.UUID) Page(org.springframework.data.domain.Page) SchedulableTaskExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.SchedulableTaskExecutor) IdmScheduledTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmScheduledTaskService) List(java.util.List) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) TransactionStatus(org.springframework.transaction.TransactionStatus) Optional(java.util.Optional) TransactionCallback(org.springframework.transaction.support.TransactionCallback) IdmIdentityService(eu.bcvsolutions.idm.core.api.service.IdmIdentityService) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) Assert(org.junit.Assert) PageImpl(org.springframework.data.domain.PageImpl) Assert.assertEquals(org.junit.Assert.assertEquals) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Example 85 with Assert.assertEquals

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

the class DefaultLongRunningTaskManagerIntegrationTest method testInterruptRunningTask.

@Test
public void testInterruptRunningTask() throws InterruptedException, ExecutionException {
    String result = "TEST_SUCCESS_05";
    Long count = 100L;
    LongRunningTaskExecutor<String> taskExecutor = new TestStopableLongRunningTaskExecutor(result, count);
    // 
    manager.execute(taskExecutor);
    IdmLongRunningTaskDto longRunningTask = manager.getLongRunningTask(taskExecutor);
    // task has to be marked as running immediately
    Assert.assertEquals(OperationState.RUNNING, longRunningTask.getResult().getState());
    // 
    Function<String, Boolean> continueFunction = res -> {
        return !manager.getLongRunningTask(taskExecutor).isRunning();
    };
    getHelper().waitForResult(continueFunction);
    // 
    longRunningTask = service.get(taskExecutor.getLongRunningTaskId());
    assertEquals(OperationState.RUNNING, longRunningTask.getResult().getState());
    assertEquals(count, longRunningTask.getCount());
    assertTrue(longRunningTask.isRunning());
    // 
    assertTrue(manager.interrupt(taskExecutor.getLongRunningTaskId()));
    // 
    longRunningTask = service.get(taskExecutor.getLongRunningTaskId());
    assertNotEquals(OperationState.RUNNING, longRunningTask.getResult().getState());
    assertEquals(count, longRunningTask.getCount());
    assertNotEquals(count, longRunningTask.getCounter());
    assertFalse(longRunningTask.isRunning());
}
Also used : IdmProcessedTaskItemDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmProcessedTaskItemDto) TestTaskExecutor(eu.bcvsolutions.idm.core.scheduler.task.impl.TestTaskExecutor) Autowired(org.springframework.beans.factory.annotation.Autowired) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) ConfigurationService(eu.bcvsolutions.idm.core.api.service.ConfigurationService) Function(java.util.function.Function) IdmProcessedTaskItemService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmProcessedTaskItemService) ArrayList(java.util.ArrayList) AutowireHelper(eu.bcvsolutions.idm.core.api.utils.AutowireHelper) IdentityDeleteBulkAction(eu.bcvsolutions.idm.core.bulk.action.impl.IdentityDeleteBulkAction) IdmIdentityFilter(eu.bcvsolutions.idm.core.api.dto.filter.IdmIdentityFilter) OperationResult(eu.bcvsolutions.idm.core.api.entity.OperationResult) ResultCodeException(eu.bcvsolutions.idm.core.api.exception.ResultCodeException) After(org.junit.After) IdmLongRunningTaskFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmLongRunningTaskFilter) ConcurrentExecutionException(eu.bcvsolutions.idm.core.scheduler.api.exception.ConcurrentExecutionException) AbstractLongRunningTaskExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor) IdmLongRunningTaskService(eu.bcvsolutions.idm.core.scheduler.api.service.IdmLongRunningTaskService) Before(org.junit.Before) EntityNotFoundException(eu.bcvsolutions.idm.core.api.exception.EntityNotFoundException) IdmIdentity(eu.bcvsolutions.idm.core.model.entity.IdmIdentity) SchedulerConfiguration(eu.bcvsolutions.idm.core.scheduler.api.config.SchedulerConfiguration) CoreException(eu.bcvsolutions.idm.core.api.exception.CoreException) Assert.assertNotNull(org.junit.Assert.assertNotNull) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) LongRunningFutureTask(eu.bcvsolutions.idm.core.scheduler.api.dto.LongRunningFutureTask) Assert.assertTrue(org.junit.Assert.assertTrue) Set(java.util.Set) OperationState(eu.bcvsolutions.idm.core.api.domain.OperationState) AcceptedException(eu.bcvsolutions.idm.core.api.exception.AcceptedException) Test(org.junit.Test) LongRunningTaskExecutor(eu.bcvsolutions.idm.core.scheduler.api.service.LongRunningTaskExecutor) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) ApplicationContext(org.springframework.context.ApplicationContext) TaskNotRecoverableException(eu.bcvsolutions.idm.core.scheduler.exception.TaskNotRecoverableException) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) ExecutionException(java.util.concurrent.ExecutionException) IdmProcessedTaskItemFilter(eu.bcvsolutions.idm.core.scheduler.api.dto.filter.IdmProcessedTaskItemFilter) List(java.util.List) Assert.assertNull(org.junit.Assert.assertNull) IdmBulkActionDto(eu.bcvsolutions.idm.core.api.bulk.action.dto.IdmBulkActionDto) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) Assert.assertFalse(org.junit.Assert.assertFalse) 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) IdmLongRunningTaskDto(eu.bcvsolutions.idm.core.scheduler.api.dto.IdmLongRunningTaskDto) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) AbstractBulkActionTest(eu.bcvsolutions.idm.test.api.AbstractBulkActionTest) Test(org.junit.Test)

Aggregations

Assert.assertEquals (org.junit.Assert.assertEquals)282 Assert (org.junit.Assert)277 Test (org.junit.Test)276 List (java.util.List)233 Assert.assertTrue (org.junit.Assert.assertTrue)191 Before (org.junit.Before)166 ArrayList (java.util.ArrayList)134 Assert.assertNotNull (org.junit.Assert.assertNotNull)133 Map (java.util.Map)121 Assert.assertFalse (org.junit.Assert.assertFalse)116 Arrays (java.util.Arrays)113 UUID (java.util.UUID)108 Autowired (org.springframework.beans.factory.annotation.Autowired)105 Collections (java.util.Collections)102 After (org.junit.After)99 HashMap (java.util.HashMap)96 Assert.assertNull (org.junit.Assert.assertNull)94 Collectors (java.util.stream.Collectors)93 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)91 IOException (java.io.IOException)85