Search in sources :

Example 1 with DefaultConnectorType

use of eu.bcvsolutions.idm.acc.connector.DefaultConnectorType in project CzechIdMng by bcvsolutions.

the class DefaultConnectorManagerTest method testSupportsConnectorTypes.

@Test
public void testSupportsConnectorTypes() {
    String defaultTableConnectorName = "net.tirasa.connid.bundles.db.table.DatabaseTableConnector";
    Resources<ConnectorTypeDto> supportedTypes = systemController.getSupportedTypes();
    // Find connector without connector type (it is default table connector
    // = table connector has tree connector types and one default connector type).
    DefaultConnectorType mockDefaultConnectorType = new DefaultConnectorType();
    ConnectorTypeDto defaultConnectorTypeDto = supportedTypes.getContent().stream().filter(connectorTypeDto -> defaultTableConnectorName.equals(connectorTypeDto.getId())).findFirst().orElse(null);
    assertNotNull(defaultConnectorTypeDto);
    assertEquals(defaultConnectorTypeDto.getIconKey(), mockDefaultConnectorType.getIconKey());
    // Find PostgreSQL connector (table connector has tree connector types and one default connector type).
    ConnectorTypeDto postgresqlConnectorTypeDto = supportedTypes.getContent().stream().filter(connectorTypeDto -> PostgresqlConnectorType.NAME.equals(connectorTypeDto.getId())).findFirst().orElse(null);
    assertNotNull(postgresqlConnectorTypeDto);
    // Find CSV connector type
    ConnectorTypeDto csvConnectorTypeDto = supportedTypes.getContent().stream().filter(connectorTypeDto -> CsvConnectorType.NAME.equals(connectorTypeDto.getId())).findFirst().orElse(null);
    assertNotNull(csvConnectorTypeDto);
}
Also used : ConnectorTypeDto(eu.bcvsolutions.idm.acc.dto.ConnectorTypeDto) DefaultConnectorType(eu.bcvsolutions.idm.acc.connector.DefaultConnectorType) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

DefaultConnectorType (eu.bcvsolutions.idm.acc.connector.DefaultConnectorType)1 ConnectorTypeDto (eu.bcvsolutions.idm.acc.dto.ConnectorTypeDto)1 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)1 Test (org.junit.Test)1