[jira] [Updated] (CAMEL-6792) Camel Test Support needs a new Method

2013-09-28 Thread James Carman (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Carman updated CAMEL-6792:


Attachment: CAMEL-6792.patch

I believe this takes care of it.

> 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.
>Priority: Minor
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CAMEL-6792) Camel Test Support needs a new Method

2013-09-28 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-6792:
---

Estimated Complexity: Novice  (was: Unknown)

The existing getMockEndpoint method should have an overloaded method with a 
boolean create option, so people can do

getMockEndpoint("mock:foo", false)

To not auto create the mock endpoint if not existing, and throw a 
NoSuchEndpoint exception if missing.

> 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.
>Priority: Minor
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CAMEL-6792) Camel Test Support needs a new Method

2013-09-28 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-6792:
---

Patch Info:   (was: Patch Available)

> 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.
>Priority: Minor
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CAMEL-6792) Camel Test Support needs a new Method

2013-09-28 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-6792:
---

Component/s: (was: tests)
 camel-test
   Priority: Minor  (was: Major)
 Issue Type: Wish  (was: Bug)

> 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.
>Priority: Minor
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira