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