Hi,
I am trying to mock rest endpoints in order to test a Custom Processor that
validates restpoints against a JSON Schema, but I am totally lost in terms
on how to write the Test and prove that my process is doing the job. I have
easily had this working: 

http://camel.apache.org/mock.html

(Mocking endpoints and skip sending to original endpoint) with the example
for "isMockEndpointsAndSkip using camel-test kit"

How can you do the same for rest endpoints? In my camel-route.xml, I have
the following:

{code}<rest path="/say">
                        <get uri="/hello">
                                <to uri="direct:hello" />
                        </get>
                        <get uri="/bye" consumes="application/json">
                                <to uri="direct:bye" />
                        </get>
                        <post uri="/bye">
                                <to uri="mock:update" />
                        </post>
                </rest>
                <route>
                        <from uri="direct:hello" />
                        <transform>
                                <constant>Hello World</constant>
                        </transform>
                </route>
                <route>
                        <from uri="direct:bye" />
                        <transform>
                                <constant>Bye World</constant>
                        </transform>
                </route>{code}

How do I modify the example for "isMockEndpointsAndSkip using camel-test
kit" to use rest endpoints?  

Can you please help?

Regards,

Ilaria



--
View this message in context: 
http://camel.465427.n5.nabble.com/Mocking-rest-endpoints-for-testing-new-Custom-Processor-tp5788601.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to