Search in sources :

Example 1 with SpringBootRuntimeProvider

use of org.apache.camel.catalog.springboot.SpringBootRuntimeProvider 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)1 DefaultCamelCatalog (org.apache.camel.catalog.DefaultCamelCatalog)1 SpringBootRuntimeProvider (org.apache.camel.catalog.springboot.SpringBootRuntimeProvider)1 Test (org.junit.Test)1