Search in sources :

Example 6 with CamelCatalog

use of org.apache.camel.catalog.CamelCatalog in project camel by apache.

the class MavenVersionManagerTest method testRuntimeProviderLoadVersion.

@Test
public void testRuntimeProviderLoadVersion() throws Exception {
    CamelCatalog catalog = new DefaultCamelCatalog(false);
    catalog.setVersionManager(new MavenVersionManager());
    catalog.setRuntimeProvider(new SpringBootRuntimeProvider());
    String version = "2.18.2";
    boolean loaded = catalog.loadVersion(version);
    assertTrue(loaded);
    loaded = catalog.loadRuntimeProviderVersion(catalog.getRuntimeProvider().getProviderGroupId(), catalog.getRuntimeProvider().getProviderArtifactId(), version);
    assertTrue(loaded);
    assertEquals(version, catalog.getLoadedVersion());
    assertEquals(version, catalog.getRuntimeProviderLoadedVersion());
    List<String> names = catalog.findComponentNames();
    assertTrue(names.contains("file"));
    assertTrue(names.contains("ftp"));
    assertTrue(names.contains("jms"));
    // camel-ejb does not work in spring-boot
    assertFalse(names.contains("ejb"));
    // camel-pac-logging does not work in spring-boot
    assertFalse(names.contains("paxlogging"));
}
Also used : CamelCatalog(org.apache.camel.catalog.CamelCatalog) DefaultCamelCatalog(org.apache.camel.catalog.DefaultCamelCatalog) SpringBootRuntimeProvider(org.apache.camel.catalog.springboot.SpringBootRuntimeProvider) DefaultCamelCatalog(org.apache.camel.catalog.DefaultCamelCatalog) Test(org.junit.Test)

Aggregations

CamelCatalog (org.apache.camel.catalog.CamelCatalog)6 DefaultCamelCatalog (org.apache.camel.catalog.DefaultCamelCatalog)6 Test (org.junit.Test)5 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 LinkedHashSet (java.util.LinkedHashSet)1 List (java.util.List)1 EndpointValidationResult (org.apache.camel.catalog.EndpointValidationResult)1 SimpleValidationResult (org.apache.camel.catalog.SimpleValidationResult)1 CamelConnectorCatalog (org.apache.camel.catalog.connector.CamelConnectorCatalog)1 ConnectorDto (org.apache.camel.catalog.connector.ConnectorDto)1 DefaultCamelConnectorCatalog (org.apache.camel.catalog.connector.DefaultCamelConnectorCatalog)1 LuceneSuggestionStrategy (org.apache.camel.catalog.lucene.LuceneSuggestionStrategy)1 MavenVersionManager (org.apache.camel.catalog.maven.MavenVersionManager)1 SpringBootRuntimeProvider (org.apache.camel.catalog.springboot.SpringBootRuntimeProvider)1 CamelEndpointDetails (org.apache.camel.parser.model.CamelEndpointDetails)1 CamelSimpleExpressionDetails (org.apache.camel.parser.model.CamelSimpleExpressionDetails)1 Resource (org.apache.maven.model.Resource)1