Search in sources :

Example 1 with TARGET_DIR

use of com.evolveum.midpoint.testing.story.sysperf.TestSystemPerformance.TARGET_DIR in project midpoint by Evolveum.

the class SourcesConfiguration method generateDummyTestResources.

private List<DummyTestResource> generateDummyTestResources() {
    List<DummyTestResource> resources = new ArrayList<>();
    for (int i = 0; i < numberOfResources; i++) {
        boolean primary = i == 0;
        String oid = UUID.randomUUID().toString();
        String resourceDefinitionFile = createResourceDefinition(i, oid, primary);
        resources.add(new DummyTestResource(TARGET_DIR, resourceDefinitionFile, oid, getResourceInstance(i), controller -> {
            if (primary) {
                createAttributes(controller, A_SINGLE_NAME, singleValuedMappings, false);
                controller.addAttrDef(controller.getDummyResource().getAccountObjectClass(), A_ROLE, String.class, false, true);
            }
            createAttributes(controller, A_MULTI_NAME, multiValuedMappings, true);
        }));
    }
    return resources;
}
Also used : Collections.emptyList(java.util.Collections.emptyList) SchemaViolationException(com.evolveum.icf.dummy.resource.SchemaViolationException) DummyTestResource(com.evolveum.midpoint.test.DummyTestResource) UUID(java.util.UUID) DummyResourceContoller(com.evolveum.midpoint.test.DummyResourceContoller) File(java.io.File) FileNotFoundException(java.io.FileNotFoundException) DummyObjectClass(com.evolveum.icf.dummy.resource.DummyObjectClass) ArrayList(java.util.ArrayList) ConflictException(com.evolveum.icf.dummy.resource.ConflictException) List(java.util.List) TARGET_DIR(com.evolveum.midpoint.testing.story.sysperf.TestSystemPerformance.TARGET_DIR) Map(java.util.Map) ConnectException(java.net.ConnectException) NotNull(org.jetbrains.annotations.NotNull) TEST_DIR(com.evolveum.midpoint.testing.story.sysperf.TestSystemPerformance.TEST_DIR) DummyTestResource(com.evolveum.midpoint.test.DummyTestResource) ArrayList(java.util.ArrayList)

Aggregations

ConflictException (com.evolveum.icf.dummy.resource.ConflictException)1 DummyObjectClass (com.evolveum.icf.dummy.resource.DummyObjectClass)1 SchemaViolationException (com.evolveum.icf.dummy.resource.SchemaViolationException)1 DummyResourceContoller (com.evolveum.midpoint.test.DummyResourceContoller)1 DummyTestResource (com.evolveum.midpoint.test.DummyTestResource)1 TARGET_DIR (com.evolveum.midpoint.testing.story.sysperf.TestSystemPerformance.TARGET_DIR)1 TEST_DIR (com.evolveum.midpoint.testing.story.sysperf.TestSystemPerformance.TEST_DIR)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 ConnectException (java.net.ConnectException)1 ArrayList (java.util.ArrayList)1 Collections.emptyList (java.util.Collections.emptyList)1 List (java.util.List)1 Map (java.util.Map)1 UUID (java.util.UUID)1 NotNull (org.jetbrains.annotations.NotNull)1