Search in sources :

Example 1 with ReportDataType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ReportDataType in project midpoint by Evolveum.

the class TestMiscTasks method test100DeleteReportData.

/**
 * MID-7277
 */
@Test
public void test100DeleteReportData() throws Exception {
    given();
    Task task = getTestTask();
    OperationResult result = task.getResult();
    ReportDataType reportData = new ReportDataType(PrismContext.get()).name("waste data");
    repoAddObject(reportData.asPrismObject(), result);
    when();
    addTask(TASK_DELETE_REPORT_DATA, result);
    waitForTaskCloseOrSuspend(TASK_DELETE_REPORT_DATA.oid, 10000);
    then();
    TaskType taskAfter = assertTask(TASK_DELETE_REPORT_DATA.oid, "after").display().assertSuccess().assertClosed().assertProgress(1).getObjectable();
    TaskInformation information = TaskInformation.createForTask(taskAfter, taskAfter);
    assertThat(information).isInstanceOf(ActivityBasedTaskInformation.class);
    assertThat(information.getProgressDescriptionShort()).as("progress description").isEqualTo("100.0%");
    assertNoRepoObject(ReportDataType.class, reportData.getOid());
}
Also used : Task(com.evolveum.midpoint.task.api.Task) ActivityBasedTaskInformation(com.evolveum.midpoint.schema.util.task.ActivityBasedTaskInformation) TaskInformation(com.evolveum.midpoint.schema.util.task.TaskInformation) TaskType(com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) ReportDataType(com.evolveum.midpoint.xml.ns._public.common.common_3.ReportDataType) Test(org.testng.annotations.Test) AbstractInitializedModelIntegrationTest(com.evolveum.midpoint.model.intest.AbstractInitializedModelIntegrationTest)

Aggregations

AbstractInitializedModelIntegrationTest (com.evolveum.midpoint.model.intest.AbstractInitializedModelIntegrationTest)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 ActivityBasedTaskInformation (com.evolveum.midpoint.schema.util.task.ActivityBasedTaskInformation)1 TaskInformation (com.evolveum.midpoint.schema.util.task.TaskInformation)1 Task (com.evolveum.midpoint.task.api.Task)1 ReportDataType (com.evolveum.midpoint.xml.ns._public.common.common_3.ReportDataType)1 TaskType (com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType)1 Test (org.testng.annotations.Test)1