use of org.apache.camel.model.rest.GetVerbDefinition in project camel by apache.
the class XmlRestParseTest method testParseSimpleRestXml.
public void testParseSimpleRestXml() throws Exception {
RestDefinition rest = assertOneRest("simpleRest.xml");
assertEquals("/users", rest.getPath());
assertEquals(1, rest.getVerbs().size());
GetVerbDefinition get = (GetVerbDefinition) rest.getVerbs().get(0);
assertEquals("/view/{id}", get.getUri());
assertEquals("direct:getUser", get.getTo().getUri());
}
use of org.apache.camel.model.rest.GetVerbDefinition in project camel by apache.
the class XmlRestParseToDTest method testParseSimpleRestXml.
public void testParseSimpleRestXml() throws Exception {
RestDefinition rest = assertOneRest("simpleRestToD.xml");
assertEquals("/users", rest.getPath());
assertEquals(1, rest.getVerbs().size());
GetVerbDefinition get = (GetVerbDefinition) rest.getVerbs().get(0);
assertEquals("/view/{id}", get.getUri());
assertEquals("bean:getUser?id=${header.id}", get.getToD().getUri());
}
Aggregations