use of com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType in project midpoint by Evolveum.
the class TestDummyItsmIntegration method test000Sanity.
@Test
public void test000Sanity() throws Exception {
OperationResult result = getTestOperationResult();
ResourceType repoResource = repositoryService.getObject(ResourceType.class, RESOURCE_DUMMY_ITSM_OID, null, result).asObjectable();
assertNotNull("No connector ref", repoResource.getConnectorRef());
String connectorOid = repoResource.getConnectorRef().getOid();
assertNotNull("No connector ref OID", connectorOid);
ConnectorType repoConnector = repositoryService.getObject(ConnectorType.class, connectorOid, null, result).asObjectable();
assertNotNull(repoConnector);
display("ITSM intetegration connector", repoConnector);
// Check connector schema
IntegrationTestTools.assertConnectorSchemaSanity(repoConnector, prismContext);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType in project midpoint by Evolveum.
the class TestConnectorDummyFake method test010ListConnectors.
@Test
public void test010ListConnectors() throws Exception {
// GIVEN
Task task = getTestTask();
OperationResult result = task.getResult();
// WHEN
List<PrismObject<ConnectorType>> connectors = modelService.searchObjects(ConnectorType.class, null, null, task, result);
// THEN
display("Connectors", connectors);
result.computeStatus();
TestUtil.assertSuccess("getObject result", result);
assertEquals("Unexpected number of connectors", 13, connectors.size());
for (PrismObject<ConnectorType> connector : connectors) {
display("Connector", connector);
ConnectorType connectorType = connector.asObjectable();
if (CONNECTOR_DUMMY_TYPE.equals(connectorType.getConnectorType())) {
String connectorVersion = connectorType.getConnectorVersion();
if (connectorVersion.contains("fake")) {
displayValue("Fake Dummy Connector OID", connector.getOid());
connectorDummyFakeOid = connector.getOid();
} else {
displayValue("Dummy Connector OID", connector.getOid());
connectorDummyOid = connector.getOid();
}
}
}
assertNotNull("No dummy connector", connectorDummyOid);
assertNotNull("No fake dummy connector", connectorDummyFakeOid);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType in project midpoint by Evolveum.
the class TestConnectorDiscovery method test001Connectors.
/**
* Check whether the connectors were discovered correctly and were added to the repository.
*/
@Test
public void test001Connectors() throws Exception {
OperationResult result = createOperationResult();
// WHEN
when();
List<PrismObject<ConnectorType>> connectors = repositoryService.searchObjects(ConnectorType.class, null, null, result);
// THEN
then();
assertFalse("No connector found", connectors.isEmpty());
display("Found " + connectors.size() + " discovered connector");
assertSuccess(result);
for (PrismObject<ConnectorType> connector : connectors) {
ConnectorType conn = connector.asObjectable();
display("Found connector " + conn, conn);
// MID-6581
IntegrationTestTools.assertConnectorSanity(conn);
IntegrationTestTools.assertConnectorSchemaSanity(conn, prismContext);
}
assertEquals("Unexpected number of connectors found", 11, connectors.size());
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType in project midpoint by Evolveum.
the class TestConnectorDiscovery method testSearchConnectorSimple.
@Test
public void testSearchConnectorSimple() throws SchemaException {
OperationResult result = createOperationResult();
PrismObject<ConnectorType> ldapConnector = findConnectorByType(IntegrationTestTools.LDAP_CONNECTOR_TYPE, result);
assertEquals("Type does not match", IntegrationTestTools.LDAP_CONNECTOR_TYPE, ldapConnector.asObjectable().getConnectorType());
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType in project midpoint by Evolveum.
the class TestConnectorDiscovery method testListConnectors.
@Test
public void testListConnectors() throws Exception {
Task task = getTestTask();
OperationResult result = createOperationResult();
List<PrismObject<ConnectorType>> connectors = provisioningService.searchObjects(ConnectorType.class, null, null, task, result);
for (PrismObject<ConnectorType> connector : connectors) {
ConnectorType conn = connector.asObjectable();
System.out.println(conn.toString());
System.out.println("connector name: " + conn.getName());
System.out.println("connector type: " + conn.getConnectorType());
System.out.println("-----\n");
}
assertEquals("Unexpected number of connectors found", 11, connectors.size());
}
Aggregations