grinch
grinch

Reputation: 814

How to mock multiple components in camel unit test?

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?

Upvotes: 2

Views: 1509

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55535

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

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

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

Upvotes: 3

Related Questions