How to mock multiple components in camel unit test?

跟風遠走 提交于 2020-01-02 11:16:07

问题


I'm using the CamelTestSupport in camel version 2.13.1.

I'd like to do something like this to mock out two different components:

@Override
public String isMockEndpoints() {
    return "(activemq|exec)*";
}

I can't just mock everything with "*" because I was getting errors from the activiti framework I'm using, which relies on the activiti component.

Have any of you found a way to do something like this?


回答1:


You can use regular expression, so its something a like:

 return "(activemq.*|exec.*)" 

See bottom of this page http://camel.apache.org/intercept



来源:https://stackoverflow.com/questions/24458180/how-to-mock-multiple-components-in-camel-unit-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!