Search in sources :

Example 76 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class EipDocumentationTest method testNotFound.

@Test
public void testNotFound() throws Exception {
    CamelContext context = new DefaultCamelContext();
    String json = context.getEipParameterJsonSchema("unknown");
    assertNull("Should not have found json for unknown", json);
}
Also used : CamelContext(org.apache.camel.CamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Test(org.junit.Test)

Example 77 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class EipDocumentationTest method testSimpleDocumentation.

@Test
public void testSimpleDocumentation() throws Exception {
    CamelContext context = new DefaultCamelContext();
    String json = context.getEipParameterJsonSchema("simple");
    log.info(json);
    assertNotNull("Should have found json for simple", json);
    assertTrue(json.contains("\"label\": \"language,core,java\""));
    assertTrue(json.contains("\"name\": \"simple\""));
}
Also used : CamelContext(org.apache.camel.CamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Test(org.junit.Test)

Example 78 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class GroovyLanguageConfigurationAndDocumentationTest method testLanguageJsonSchema.

@Test
public void testLanguageJsonSchema() throws Exception {
    CamelContext context = new DefaultCamelContext();
    String json = context.getLanguageParameterJsonSchema("groovy");
    assertNotNull("Should have found some auto-generated JSON", json);
    log.info(json);
    assertTrue(json.contains("\"name\": \"groovy\""));
    assertTrue(json.contains("\"modelName\": \"groovy\""));
}
Also used : CamelContext(org.apache.camel.CamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Test(org.junit.Test)

Example 79 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class SimpleLanguageConfigurationAndDocumentationTest method testLanguageJsonSchema.

@Test
public void testLanguageJsonSchema() throws Exception {
    CamelContext context = new DefaultCamelContext();
    String json = context.getLanguageParameterJsonSchema("simple");
    assertNotNull("Should have found some auto-generated JSON", json);
    log.info(json);
    assertTrue(json.contains("\"name\": \"simple\""));
    assertTrue(json.contains("\"modelName\": \"simple\""));
    assertTrue(json.contains("\"resultType\": { \"kind\": \"attribute\", \"displayName\": \"Result Type\", \"required\": false, \"type\": \"string\", \"javaType\": \"java.lang.String\", \"deprecated\": false"));
}
Also used : CamelContext(org.apache.camel.CamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Test(org.junit.Test)

Example 80 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class StringDataFormatConfigurationAndDocumentationTest method testDataFormatJsonSchema.

@Test
public void testDataFormatJsonSchema() throws Exception {
    CamelContext context = new DefaultCamelContext();
    String json = context.getDataFormatParameterJsonSchema("string");
    assertNotNull("Should have found some auto-generated JSON", json);
    log.info(json);
    assertTrue(json.contains("\"name\": \"string\""));
    assertTrue(json.contains("\"modelName\": \"string\""));
    assertTrue(json.contains("\"charset\": { \"kind\": \"attribute\", \"displayName\": \"Charset\", \"required\": false, \"type\": \"string\""));
}
Also used : CamelContext(org.apache.camel.CamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Test(org.junit.Test)

Aggregations

CamelContext (org.apache.camel.CamelContext)1478 Test (org.junit.Test)691 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)684 RouteBuilder (org.apache.camel.builder.RouteBuilder)448 ProducerTemplate (org.apache.camel.ProducerTemplate)434 ConnectionFactory (javax.jms.ConnectionFactory)220 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)210 Exchange (org.apache.camel.Exchange)109 HashMap (java.util.HashMap)93 Endpoint (org.apache.camel.Endpoint)52 DefaultExchange (org.apache.camel.impl.DefaultExchange)50 IOException (java.io.IOException)46 Map (java.util.Map)45 SimpleRegistry (org.apache.camel.impl.SimpleRegistry)44 CountDownLatch (java.util.concurrent.CountDownLatch)42 SpringCamelContext (org.apache.camel.spring.SpringCamelContext)42 ArrayList (java.util.ArrayList)41 Processor (org.apache.camel.Processor)40 PropertiesComponent (org.apache.camel.component.properties.PropertiesComponent)37 CamelExecutionException (org.apache.camel.CamelExecutionException)33