Search in sources :

Example 1 with DummyResource

use of com.evolveum.icf.dummy.resource.DummyResource in project midpoint by Evolveum.

the class AbstractModelIntegrationTest method assertDummyGroupMember.

protected void assertDummyGroupMember(String dummyInstanceName, String dummyGroupName, String accountId) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException {
    DummyResource dummyResource = DummyResource.getInstance(dummyInstanceName);
    DummyGroup group = dummyResource.getGroupByName(dummyGroupName);
    assertNotNull("No dummy group " + dummyGroupName, group);
    IntegrationTestTools.assertGroupMember(group, accountId);
}
Also used : DummyResource(com.evolveum.icf.dummy.resource.DummyResource) DummyGroup(com.evolveum.icf.dummy.resource.DummyGroup)

Example 2 with DummyResource

use of com.evolveum.icf.dummy.resource.DummyResource in project midpoint by Evolveum.

the class TestInbounds method test000Sanity.

@Test
public void test000Sanity() throws Exception {
    // GIVEN
    Task task = getTestTask();
    // WHEN
    when();
    OperationResult testResult = modelService.testResource(RESOURCE_DUMMY_ORANGE_OID, task);
    // THEN
    then();
    TestUtil.assertSuccess("Test orange resource", testResult);
    DummyResource dummyResourceOrange = getDummyResource(RESOURCE_DUMMY_ORANGE_NAME);
    assertEquals("Wrong ORANGE useless string", IntegrationTestTools.CONST_USELESS, dummyResourceOrange.getUselessString());
}
Also used : Task(com.evolveum.midpoint.task.api.Task) DummyResource(com.evolveum.icf.dummy.resource.DummyResource) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) Test(org.testng.annotations.Test)

Example 3 with DummyResource

use of com.evolveum.icf.dummy.resource.DummyResource in project midpoint by Evolveum.

the class AbstractModelIntegrationTest method assertNoDummyGroupMember.

protected void assertNoDummyGroupMember(String dummyInstanceName, String dummyGroupName, String accountId) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException {
    DummyResource dummyResource = DummyResource.getInstance(dummyInstanceName);
    DummyGroup group = dummyResource.getGroupByName(dummyGroupName);
    IntegrationTestTools.assertNoGroupMember(group, accountId);
}
Also used : DummyResource(com.evolveum.icf.dummy.resource.DummyResource) DummyGroup(com.evolveum.icf.dummy.resource.DummyGroup)

Example 4 with DummyResource

use of com.evolveum.icf.dummy.resource.DummyResource in project midpoint by Evolveum.

the class TestNotifyChange method initSystem.

@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
    super.initSystem(initTask, initResult);
    // Resources
    DummyResourceContoller dummyResourceCtlGrouper = DummyResourceContoller.create(RESOURCE_GROUPER_ID, resourceDummyGrouper);
    DummyResource dummyResourceGrouper = dummyResourceCtlGrouper.getDummyResource();
    dummyResourceGrouper.setSyncStyle(DummySyncStyle.SMART);
    dummyResourceGrouper.populateWithDefaultSchema();
    resourceDummyGrouper = importAndGetObjectFromFile(ResourceType.class, RESOURCE_GROUPER_FILE, RESOURCE_GROUPER_OID, initTask, initResult);
    dummyResourceCtlGrouper.setResource(resourceDummyGrouper);
}
Also used : DummyResource(com.evolveum.icf.dummy.resource.DummyResource) ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType) DummyResourceContoller(com.evolveum.midpoint.test.DummyResourceContoller)

Aggregations

DummyResource (com.evolveum.icf.dummy.resource.DummyResource)4 DummyGroup (com.evolveum.icf.dummy.resource.DummyGroup)2 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 Task (com.evolveum.midpoint.task.api.Task)1 DummyResourceContoller (com.evolveum.midpoint.test.DummyResourceContoller)1 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)1 Test (org.testng.annotations.Test)1