use of com.fasterxml.jackson.databind.ObjectMapper in project camel by apache.
the class CamelCatalogJsonSchemaTest method testValidateJsonModels.
@Test
public void testValidateJsonModels() throws Exception {
for (String name : catalog.findModelNames()) {
String json = catalog.modelJSonSchema(name);
// validate we can parse the json
ObjectMapper mapper = new ObjectMapper();
JsonNode tree = mapper.readTree(json);
assertNotNull(tree);
assertTrue(name, tree.has("model"));
assertTrue(name, tree.has("properties"));
}
}
use of com.fasterxml.jackson.databind.ObjectMapper 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);
}
use of com.fasterxml.jackson.databind.ObjectMapper 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);
}
use of com.fasterxml.jackson.databind.ObjectMapper 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);
}
use of com.fasterxml.jackson.databind.ObjectMapper 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);
}
Aggregations