use of org.talend.designer.runprocess.IESBRunContainerService in project tesb-studio-se by Talend.
the class LocalESBRunContainerServiceTest method testCreateJavaProcessor.
/**
* Test method for
* {@link org.talend.designer.esb.runcontainer.core.LocalESBRunContainerService#createJavaProcessor(org.talend.core.model.process.IProcess, Property, boolean)}
*/
@Test
public void testCreateJavaProcessor() {
IESBRunContainerService service = (IESBRunContainerService) GlobalServiceRegister.getDefault().getService(IESBRunContainerService.class);
String[] esbComponents = { "tESBProviderRequest", "tRESTClient", "tRESTRequest", "tRESTResponse", "tESBConsumer", "tESBProviderFault", "tESBProviderRequest", "tESBProviderResponse" };
for (String esbComponent : esbComponents) {
Property property = PropertiesFactory.eINSTANCE.createProperty();
property.setVersion("0.1");
property.setId("property1");
property.setLabel("ESBArtifact");
ProcessItem processItem = PropertiesFactory.eINSTANCE.createProcessItem();
processItem.setProperty(property);
property.setItem(processItem);
ProcessType process = TalendFileFactory.eINSTANCE.createProcessType();
processItem.setProcess(process);
NodeType node = TalendFileFactory.eINSTANCE.createNodeType();
process.getNode().add(node);
node.setComponentName(esbComponent);
IComponent tESBComponent = ComponentsFactoryProvider.getInstance().get(esbComponent, ComponentCategory.CATEGORY_4_DI.getName());
Process esbJob = new Process(property);
Node tESBComponent_1 = new Node(tESBComponent, esbJob);
esbJob.addNodeContainer(new NodeContainer(tESBComponent_1));
Assert.assertNotNull(service.createJavaProcessor(esbJob, property, false));
}
}
use of org.talend.designer.runprocess.IESBRunContainerService in project tesb-studio-se by Talend.
the class LocalESBRunContainerServiceTest method testCreateJavaProcessor.
/**
* Test method for
* {@link org.talend.designer.esb.runcontainer.core.LocalESBRunContainerService#createJavaProcessor(org.talend.core.model.process.IProcess, Property, boolean)}
*/
@Test
public void testCreateJavaProcessor() {
IESBRunContainerService service = (IESBRunContainerService) GlobalServiceRegister.getDefault().getService(IESBRunContainerService.class);
String[] esbComponents = { "tESBProviderRequest", "tRESTClient", "tRESTRequest", "tRESTResponse", "tESBConsumer", "tESBProviderFault", "tESBProviderRequest", "tESBProviderResponse" };
for (String esbComponent : esbComponents) {
Property property = PropertiesFactory.eINSTANCE.createProperty();
property.setVersion("0.1");
property.setId("property1");
property.setLabel("ESBArtifact");
ProcessItem processItem = PropertiesFactory.eINSTANCE.createProcessItem();
processItem.setProperty(property);
property.setItem(processItem);
ProcessType process = TalendFileFactory.eINSTANCE.createProcessType();
processItem.setProcess(process);
NodeType node = TalendFileFactory.eINSTANCE.createNodeType();
process.getNode().add(node);
node.setComponentName(esbComponent);
IComponent tESBComponent = ComponentsFactoryProvider.getInstance().get(esbComponent, ComponentCategory.CATEGORY_4_DI.getName());
Process esbJob = new Process(property);
Node tESBComponent_1 = new Node(tESBComponent, esbJob);
esbJob.addNodeContainer(new NodeContainer(tESBComponent_1));
Assert.assertNotNull(service.createJavaProcessor(esbJob, property, false));
}
}
Aggregations