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);
}
Aggregations