Search in sources :

Example 1 with RouteDocumentItem

use of org.talend.camel.core.model.camelProperties.RouteDocumentItem in project tesb-studio-se by Talend.

the class CamelRepositoryContentHandlerTest method testCreateNewItem.

/**
 * Test method for
 * {@link org.talend.camel.designer.CamelRepositoryContentHandler#createNewItem(org.talend.core.model.repository.ERepositoryObjectType)}
 * .
 */
@Test
public void testCreateNewItem() {
    CamelRepositoryContentHandler handler = new CamelRepositoryContentHandler();
    Assert.assertTrue(handler.createNewItem(ERepositoryObjectType.PROCESS_ROUTE) instanceof CamelProcessItem);
    Assert.assertTrue(handler.createNewItem(ERepositoryObjectType.RESOURCES) instanceof RouteResourceItem);
    Assert.assertTrue(handler.createNewItem(ERepositoryObjectType.valueOf(ERepositoryObjectType.class, "BEANS")) instanceof BeanItem);
    Assert.assertNull(handler.createNewItem(ERepositoryObjectType.valueOf(ERepositoryObjectType.class, "ROUTE_RESOURCES")));
    Assert.assertTrue(handler.createNewItem(ERepositoryObjectType.valueOf(ERepositoryObjectType.class, "ROUTE_DOC")) instanceof RouteDocumentItem);
}
Also used : RouteDocumentItem(org.talend.camel.core.model.camelProperties.RouteDocumentItem) RouteResourceItem(org.talend.camel.core.model.camelProperties.RouteResourceItem) CamelRepositoryContentHandler(org.talend.camel.designer.CamelRepositoryContentHandler) CamelProcessItem(org.talend.camel.core.model.camelProperties.CamelProcessItem) BeanItem(org.talend.camel.core.model.camelProperties.BeanItem) ERepositoryObjectType(org.talend.core.model.repository.ERepositoryObjectType) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 BeanItem (org.talend.camel.core.model.camelProperties.BeanItem)1 CamelProcessItem (org.talend.camel.core.model.camelProperties.CamelProcessItem)1 RouteDocumentItem (org.talend.camel.core.model.camelProperties.RouteDocumentItem)1 RouteResourceItem (org.talend.camel.core.model.camelProperties.RouteResourceItem)1 CamelRepositoryContentHandler (org.talend.camel.designer.CamelRepositoryContentHandler)1 ERepositoryObjectType (org.talend.core.model.repository.ERepositoryObjectType)1