That is simpler than stubbing.
MockEndpoint uri = getMockEndpoint("mock:restletUri");
context.addEndpoint("restlet://http://localhost:8080/whatever";, uri);
--
View this message in context:
http://camel.465427.n5.nabble.com/Testing-Restlet-endpoints-after-refactoring-t
Hi,
Yes, I was thinking about that as well.
But since I only need it when I run unit tests I decided to mock the
URI.getHost, URI.getPort and URI.getScheme instead using PowerMock and
Mockito.
import static
org.powermock.api.support.membermodification.MemberMatcher.method;
import static
org.power
Hi
Maybe if its/was possible to setup the host and port on the
RestletComponent, then the endpoint can fallback and use those options
if non specified in the uri. Then for production they can be / to
indicate servlet, and for unit test, you can set it up to a localhost
8080 or whatever.
On Fri,
After following the "Using the Restlet servlet within a webapp"
documentation at http://camel.apache.org/restlet.html I refactored my
Restlet endpoints by removing protocol, host and port.
So from "restlet:http://host:port/path/{id}"; to "restlet:/path/{id}".
This works great when running in a serv