Search in sources :

Example 41 with JsonNode

use of com.fasterxml.jackson.databind.JsonNode in project camel by apache.

the class CamelCatalogTest method testAddComponent.

@Test
public void testAddComponent() throws Exception {
    catalog.addComponent("dummy", "org.foo.camel.DummyComponent");
    assertTrue(catalog.findComponentNames().contains("dummy"));
    String json = catalog.componentJSonSchema("dummy");
    assertNotNull(json);
    // validate we can parse the json
    ObjectMapper mapper = new ObjectMapper();
    JsonNode tree = mapper.readTree(json);
    assertNotNull(tree);
}
Also used : JsonNode(com.fasterxml.jackson.databind.JsonNode) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Example 42 with JsonNode

use of com.fasterxml.jackson.databind.JsonNode in project camel by apache.

the class CamelCatalogTest method testListComponentsAsJson.

@Test
public void testListComponentsAsJson() throws Exception {
    String json = catalog.listComponentsAsJson();
    assertNotNull(json);
    // validate we can parse the json
    ObjectMapper mapper = new ObjectMapper();
    JsonNode tree = mapper.readTree(json);
    assertNotNull(tree);
}
Also used : JsonNode(com.fasterxml.jackson.databind.JsonNode) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Example 43 with JsonNode

use of com.fasterxml.jackson.databind.JsonNode in project camel by apache.

the class CamelCatalogTest method testSummaryAsJson.

@Test
public void testSummaryAsJson() throws Exception {
    String json = catalog.summaryAsJson();
    assertNotNull(json);
    // validate we can parse the json
    ObjectMapper mapper = new ObjectMapper();
    JsonNode tree = mapper.readTree(json);
    assertNotNull(tree);
}
Also used : JsonNode(com.fasterxml.jackson.databind.JsonNode) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Example 44 with JsonNode

use of com.fasterxml.jackson.databind.JsonNode in project camel by apache.

the class CamelCatalogTest method testListLanguagesAsJson.

@Test
public void testListLanguagesAsJson() throws Exception {
    String json = catalog.listLanguagesAsJson();
    assertNotNull(json);
    // validate we can parse the json
    ObjectMapper mapper = new ObjectMapper();
    JsonNode tree = mapper.readTree(json);
    assertNotNull(tree);
}
Also used : JsonNode(com.fasterxml.jackson.databind.JsonNode) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Example 45 with JsonNode

use of com.fasterxml.jackson.databind.JsonNode in project camel by apache.

the class CamelCatalogTest method testListModelsAsJson.

@Test
public void testListModelsAsJson() throws Exception {
    String json = catalog.listModelsAsJson();
    assertNotNull(json);
    // validate we can parse the json
    ObjectMapper mapper = new ObjectMapper();
    JsonNode tree = mapper.readTree(json);
    assertNotNull(tree);
}
Also used : JsonNode(com.fasterxml.jackson.databind.JsonNode) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Aggregations

JsonNode (com.fasterxml.jackson.databind.JsonNode)1055 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)275 Test (org.junit.Test)267 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)165 CloseableHttpResponse (org.apache.http.client.methods.CloseableHttpResponse)125 IOException (java.io.IOException)124 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)97 HashMap (java.util.HashMap)78 ArrayList (java.util.ArrayList)75 HttpGet (org.apache.http.client.methods.HttpGet)69 JsonException (jmri.server.json.JsonException)66 Deployment (org.activiti.engine.test.Deployment)66 InputStream (java.io.InputStream)64 StringEntity (org.apache.http.entity.StringEntity)54 ByteArrayInputStream (java.io.ByteArrayInputStream)53 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)49 Map (java.util.Map)45 Task (org.activiti.engine.task.Task)41 HttpPost (org.apache.http.client.methods.HttpPost)39 Tree (org.apache.jackrabbit.oak.api.Tree)30