Hi,


I have a simple blueprint route that uses camel-mail to send an email. The 
protocol (i.e. component), host and port are set up as property

placeholders:



<route id="myRoute">

  <from uri="direct:sendEmail"/>

  <to uri="{{email.protocol}}://{{email.host}}:{{email.port}}" />

</route>



When deployed to Fuse ESB the blueprint containing this route works fine. My 
problem comes when trying to mock the to endpoint in a unit test (which extends 
CamelBlueprintTestSupport).



When I run my test I find that it's looking for a ComponentResolver for 
component={{email.protocol}}, which makes sense. Unfortunately this seems to be 
happening during the creation of the CamelContext so I can't mock it or replace 
it with a stub.



I believe I could create a ComponentResolver to handle such a component, but 
I'd rather not. Is there a simpler solution?



If you're wondering, I've got the component part of the endpoint as a property 
placeholder so we can easily configure smpt vs. smtps.


Thanks

________________________________

This message contains confidential and proprietary information of the sender, 
and is intended only for the person(s) to whom it is addressed. Any use, 
distribution, copying, disclosure or taking of any action in reliance upon it 
by any other person is strictly prohibited. If you have received this message 
in error, please notify the e-mail sender immediately, and delete the original 
message without making a copy. Monitise accepts no liability if this email 
harms any systems or data of the recipient (including as a result of software 
virus infection or where this e-mail is modified or amended in any way during 
or following transmission) or if this email is accessed by anyone other than 
the person(s) to whom it is addressed.

The Monitise group includes Monitise plc (Reg. No. 6011822), Monitise Group 
Limited (Reg. No. 5590897), Monitise International Limited (Reg. No. 5556711), 
Monitise Europe Limited (Reg. No. 4831976) and Mobile Money Network Limited 
(Reg. No. 7153130). These companies are registered in England and Wales and 
their registered office address is 95 Gresham Street, London, EC2V 7NA United 
Kingdom.

Reply via email to