Add camel endpoint validation tests to camel config
---------------------------------------------------
Key: SWITCHYARD-315
URL:
https://issues.jboss.org/browse/SWITCHYARD-315
Project: SwitchYard
Issue Type: Task
Components: component-camel
Reporter: Keith Babo
Assignee: Mario Antollini
Fix For: 0.2
At present, we test the Camel config implementation to make sure it can read and write SCA
binding config for each Camel component type. The one thing that's missing is
validating that the URI we are producing is interpreted correctly by Camel. As it turns
out, there's a pretty easy way of doing this. For example, the following test could
be added to V1CamelFileConsumerBindingModelTest:
{noformat}
@Test
public void testCamelEndpoint() {
CamelFileBindingModel model = createFileConsumerModel();
String configUri = model.getComponentURI().toString();
CamelContext context = new DefaultCamelContext();
FileEndpoint endpoint = context.getEndpoint(configUri, FileEndpoint.class);
Assert.assertEquals(BUFFER_SIZE, endpoint.getBufferSize());
// add asserts for all other config values here ...
}
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira