use of org.apache.camel.catalog.DefaultCamelCatalog in project camel by apache.
the class CamelCatalogLuceneTest method createCamelCatalog.
@Before
public void createCamelCatalog() {
catalog = new DefaultCamelCatalog();
catalog.setSuggestionStrategy(new LuceneSuggestionStrategy());
}
use of org.apache.camel.catalog.DefaultCamelCatalog in project camel by apache.
the class MavenArtifactProviderTest method testAddConnector.
@Test
public void testAddConnector() {
CamelCatalog camelCatalog = new DefaultCamelCatalog();
CamelConnectorCatalog camelConnectorCatalog = new DefaultCamelConnectorCatalog();
MavenArtifactProvider provider = new DefaultMavenArtifactProvider();
provider.setCacheDirectory("target/cache");
int before = camelCatalog.findComponentNames().size();
List<ConnectorDto> list = camelConnectorCatalog.findConnector("foo", false);
assertEquals(0, list.size());
Set<String> names = provider.addArtifactToCatalog(camelCatalog, camelConnectorCatalog, "org.apache.camel", "myfoo-connector", camelCatalog.getCatalogVersion());
assertTrue(names.contains("MyFoo"));
int after = camelCatalog.findComponentNames().size();
assertTrue("Should find 1 new component", after - before == 1);
list = camelConnectorCatalog.findConnector("foo", false);
assertEquals(1, list.size());
assertEquals("MyFoo", list.get(0).getName());
assertTrue(camelCatalog.findComponentNames().contains("my-foo"));
}
use of org.apache.camel.catalog.DefaultCamelCatalog in project camel by apache.
the class SpringBootRuntimeProviderTest method createCamelCatalog.
@BeforeClass
public static void createCamelCatalog() {
catalog = new DefaultCamelCatalog();
catalog.setRuntimeProvider(new SpringBootRuntimeProvider());
}
use of org.apache.camel.catalog.DefaultCamelCatalog 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"));
}
Aggregations