[
https://issues.apache.org/jira/browse/CAMEL-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-6792.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.13.0
2.12.2
2.11.3
Assignee: Claus Ibsen
Thanks for the patch.
> Camel Test Support needs a new Method
> -------------------------------------
>
> Key: CAMEL-6792
> URL: https://issues.apache.org/jira/browse/CAMEL-6792
> Project: Camel
> Issue Type: Wish
> Components: camel-test
> Affects Versions: 2.11.1
> Environment: ALL
> Reporter: Robert E. Simmons Jr. MSc.
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.11.3, 2.12.2, 2.13.0
>
> Attachments: CAMEL-6792.patch
>
>
> There is a problem with the CamelTestSupport class in that if you call
> getMockEndpoint on an endpoint that doesnt exist, it blithely returns you an
> endpoint connected to nothing. The problem is you end up chasing endless test
> failures when the fact is your endpoint is not even there. So I suggest a
> method I added to my subclass of CamelTestSupport which is:
> protected MockEndpoint assertAndGetMockEndpoint(final String uri) {
> assertNotNull(context.hasEndpoint(uri));
> return getMockEndpoint(uri);
> }
> This method will make sure that the endpoint is there before returning it and
> it will make tests easier to write.
--
This message was sent by Atlassian JIRA
(v6.1#6144)