Search in sources :

Example 6 with ComponentProxyComponent

use of io.syndesis.integration.component.proxy.ComponentProxyComponent in project syndesis by syndesisio.

the class DataShapeCustomizerTest method shouldAllowNullInput.

@Test
public void shouldAllowNullInput() throws Exception {
    final ComponentProxyComponent component = setUpComponent("salesforce-create-sobject");
    final Exchange exchange = new DefaultExchange(context);
    final Message in = exchange.getIn();
    component.getBeforeProducer().process(exchange);
    Assertions.assertThat(in.getBody()).isNull();
}
Also used : DefaultExchange(org.apache.camel.impl.DefaultExchange) Exchange(org.apache.camel.Exchange) DefaultExchange(org.apache.camel.impl.DefaultExchange) ComponentProxyComponent(io.syndesis.integration.component.proxy.ComponentProxyComponent) Message(org.apache.camel.Message) Test(org.junit.Test)

Example 7 with ComponentProxyComponent

use of io.syndesis.integration.component.proxy.ComponentProxyComponent in project syndesis by syndesisio.

the class DataShapeCustomizerTest method shouldAllowNullOutput.

@Test
public void shouldAllowNullOutput() throws Exception {
    final ComponentProxyComponent component = setUpComponent("salesforce-create-sobject");
    final Exchange exchange = new DefaultExchange(context);
    final Message out = exchange.getOut();
    component.getAfterProducer().process(exchange);
    Assertions.assertThat(out.getBody()).isNull();
}
Also used : DefaultExchange(org.apache.camel.impl.DefaultExchange) Exchange(org.apache.camel.Exchange) DefaultExchange(org.apache.camel.impl.DefaultExchange) ComponentProxyComponent(io.syndesis.integration.component.proxy.ComponentProxyComponent) Message(org.apache.camel.Message) Test(org.junit.Test)

Example 8 with ComponentProxyComponent

use of io.syndesis.integration.component.proxy.ComponentProxyComponent in project syndesis by syndesisio.

the class DataShapeCustomizerTest method shouldUnmarshallToSpecifiedInputType.

@Test
public void shouldUnmarshallToSpecifiedInputType() throws Exception {
    final ComponentProxyComponent component = setUpComponent("salesforce-delete-sobject");
    final Exchange exchange = new DefaultExchange(context);
    final Message in = exchange.getIn();
    in.setBody("{}");
    component.getBeforeProducer().process(exchange);
    Assertions.assertThat(in.getBody()).isInstanceOf(SalesforceIdentifier.class);
}
Also used : DefaultExchange(org.apache.camel.impl.DefaultExchange) Exchange(org.apache.camel.Exchange) DefaultExchange(org.apache.camel.impl.DefaultExchange) ComponentProxyComponent(io.syndesis.integration.component.proxy.ComponentProxyComponent) Message(org.apache.camel.Message) Test(org.junit.Test)

Aggregations

ComponentProxyComponent (io.syndesis.integration.component.proxy.ComponentProxyComponent)8 Test (org.junit.Test)6 Exchange (org.apache.camel.Exchange)5 Message (org.apache.camel.Message)5 DefaultExchange (org.apache.camel.impl.DefaultExchange)5 ConnectorAction (io.syndesis.common.model.action.ConnectorAction)2 Connector (io.syndesis.common.model.connection.Connector)2 ConnectorDescriptor (io.syndesis.common.model.action.ConnectorDescriptor)1 ConfigurationProperty (io.syndesis.common.model.connection.ConfigurationProperty)1 Connection (io.syndesis.common.model.connection.Connection)1 ComponentProxyCustomizer (io.syndesis.integration.component.proxy.ComponentProxyCustomizer)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 CamelContext (org.apache.camel.CamelContext)1 Processor (org.apache.camel.Processor)1 Pipeline (org.apache.camel.processor.Pipeline)1