use of com.evolveum.midpoint.test.DummyTestResource 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;
}
use of com.evolveum.midpoint.test.DummyTestResource in project midpoint by Evolveum.
the class TargetsConfiguration method generateDummyTestResources.
private List<DummyTestResource> generateDummyTestResources() {
List<DummyTestResource> resources = new ArrayList<>();
for (int i = 0; i < numberOfResources; i++) {
String oid = UUID.randomUUID().toString();
String resourceDefinitionFile = createResourceDefinition(i, oid);
resources.add(new DummyTestResource(TARGET_DIR, resourceDefinitionFile, oid, getResourceInstance(i), controller -> {
createAttributes(controller, A_SINGLE_NAME, singleValuedMappings, false);
createAttributes(controller, A_MULTI_NAME, multiValuedMappings, true);
controller.addAttrDef(controller.getDummyResource().getAccountObjectClass(), A_MEMBERSHIP, String.class, false, true);
controller.addAttrDef(controller.getDummyResource().getGroupObjectClass(), DummyGroup.ATTR_MEMBERS_NAME, String.class, false, true);
}));
}
return resources;
}
use of com.evolveum.midpoint.test.DummyTestResource in project midpoint by Evolveum.
the class SourceInitializer method run.
public void run(OperationResult result) throws Exception {
boolean primary = true;
for (DummyTestResource resource : resources) {
initializeResource(resource, result);
createAccounts(resource, primary);
primary = false;
}
}
Aggregations