Search in sources :

Example 16 with ConnectorSettings

use of io.syndesis.common.model.connection.ConnectorSettings in project syndesis by syndesisio.

the class ConnectorGeneratorTest method shouldCreateBaseConnectors.

@Test
public void shouldCreateBaseConnectors() {
    final ConnectorSettings settings = new ConnectorSettings.Builder().putConfiguredProperty("property2", "value2").build();
    final Connector connector = generator.baseConnectorFrom(template, settings);
    // 
    assertThat(connector).isEqualToIgnoringGivenFields(// 
    new Connector.Builder().name(// 
    "test-name").description(// 
    "test-description").connectorGroup(// 
    template.getConnectorGroup()).connectorGroupId(// 
    "template-group").properties(// 
    template.getConnectorProperties()).putConfiguredProperty("property2", // 
    "value2").build(), "id", "icon");
    assertThat(connector.getIcon()).isEqualTo("data:image/svg+xml,dummy");
}
Also used : Connector(io.syndesis.common.model.connection.Connector) ConnectorSettings(io.syndesis.common.model.connection.ConnectorSettings) Test(org.junit.Test)

Aggregations

ConnectorSettings (io.syndesis.common.model.connection.ConnectorSettings)16 Test (org.junit.Test)12 Connector (io.syndesis.common.model.connection.Connector)10 ConnectorSummary (io.syndesis.common.model.connection.ConnectorSummary)7 ConnectorAction (io.syndesis.common.model.action.ConnectorAction)3 ConfigurationProperty (io.syndesis.common.model.connection.ConfigurationProperty)3 ConnectorTemplate (io.syndesis.common.model.connection.ConnectorTemplate)3 ConnectorGenerator (io.syndesis.server.connector.generator.ConnectorGenerator)3 ApiOperation (io.swagger.annotations.ApiOperation)2 DataShape (io.syndesis.common.model.DataShape)2 ActionsSummary (io.syndesis.common.model.action.ActionsSummary)2 IOException (java.io.IOException)2 ApiResponses (io.swagger.annotations.ApiResponses)1 HttpMethod (io.swagger.models.HttpMethod)1 Info (io.swagger.models.Info)1 Operation (io.swagger.models.Operation)1 Path (io.swagger.models.Path)1 Swagger (io.swagger.models.Swagger)1 AbstractSerializableParameter (io.swagger.models.parameters.AbstractSerializableParameter)1 BodyParameter (io.swagger.models.parameters.BodyParameter)1