You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Chris Purcell (JIRA)" <ji...@apache.org> on 2009/10/12 10:41:52 UTC
[jira] Created: (CAMEL-2061) Make MockEndpoint double as a bean for
use in Camel route tests
Make MockEndpoint double as a bean for use in Camel route tests
---------------------------------------------------------------
Key: CAMEL-2061
URL: https://issues.apache.org/activemq/browse/CAMEL-2061
Project: Apache Camel
Issue Type: Improvement
Components: camel-core
Affects Versions: 2.0.0
Reporter: Chris Purcell
Fix For: Future
The following class turns a MockEndpoint into a very capable bean for use in Camel route unit tests:
public class MockEndpointBean extends MockEndpoint {
@Handler
public void handle(Exchange exchange) throws Exception {
onExchange(exchange);
}
}
If this public method were added to MockEndpont, the subclass would not be necessary. A Spring Camel route could use the following bean:
<bean id="myBean" class="org.apache.camel.component.mock.MockEndpoint" />
and inject the endpoint into any unit test:
@EndpointInject
private MockEndpoint myBean;
and then control the behaviour of the bean like any other MockEndpoint using the powerful when and assert methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2061) Make MockEndpoint double as a bean for
use in Camel route tests
Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hadrian Zbarcea updated CAMEL-2061:
-----------------------------------
Fix Version/s: 2.3.0
(was: 2.4.0)
> Make MockEndpoint double as a bean for use in Camel route tests
> ---------------------------------------------------------------
>
> Key: CAMEL-2061
> URL: https://issues.apache.org/activemq/browse/CAMEL-2061
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Chris Purcell
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.3.0
>
>
> The following class turns a MockEndpoint into a very capable bean for use in Camel route unit tests:
> public class MockEndpointBean extends MockEndpoint {
> @Handler
> public void handle(Exchange exchange) throws Exception {
> onExchange(exchange);
> }
> }
> If this public method were added to MockEndpont, the subclass would not be necessary. A Spring Camel route could use the following bean:
> <bean id="myBean" class="org.apache.camel.component.mock.MockEndpoint" />
> and inject the endpoint into any unit test:
> @EndpointInject
> private MockEndpoint myBean;
> and then control the behaviour of the bean like any other MockEndpoint using the powerful when and assert methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2061) Make MockEndpoint double as a bean for
use in Camel route tests
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2061:
-------------------------------
Fix Version/s: 2.4.0
(was: Future)
Not a bad idea to improve and make testing easier
> Make MockEndpoint double as a bean for use in Camel route tests
> ---------------------------------------------------------------
>
> Key: CAMEL-2061
> URL: https://issues.apache.org/activemq/browse/CAMEL-2061
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Chris Purcell
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.4.0
>
>
> The following class turns a MockEndpoint into a very capable bean for use in Camel route unit tests:
> public class MockEndpointBean extends MockEndpoint {
> @Handler
> public void handle(Exchange exchange) throws Exception {
> onExchange(exchange);
> }
> }
> If this public method were added to MockEndpont, the subclass would not be necessary. A Spring Camel route could use the following bean:
> <bean id="myBean" class="org.apache.camel.component.mock.MockEndpoint" />
> and inject the endpoint into any unit test:
> @EndpointInject
> private MockEndpoint myBean;
> and then control the behaviour of the bean like any other MockEndpoint using the powerful when and assert methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2061) Make MockEndpoint double as a bean
for use in Camel route tests
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2061.
--------------------------------
Resolution: Fixed
trunk: 946905
> Make MockEndpoint double as a bean for use in Camel route tests
> ---------------------------------------------------------------
>
> Key: CAMEL-2061
> URL: https://issues.apache.org/activemq/browse/CAMEL-2061
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Chris Purcell
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.4.0
>
>
> The following class turns a MockEndpoint into a very capable bean for use in Camel route unit tests:
> public class MockEndpointBean extends MockEndpoint {
> @Handler
> public void handle(Exchange exchange) throws Exception {
> onExchange(exchange);
> }
> }
> If this public method were added to MockEndpont, the subclass would not be necessary. A Spring Camel route could use the following bean:
> <bean id="myBean" class="org.apache.camel.component.mock.MockEndpoint" />
> and inject the endpoint into any unit test:
> @EndpointInject
> private MockEndpoint myBean;
> and then control the behaviour of the bean like any other MockEndpoint using the powerful when and assert methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-2061) Make MockEndpoint double as a bean
for use in Camel route tests
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2061:
----------------------------------
Assignee: Claus Ibsen
> Make MockEndpoint double as a bean for use in Camel route tests
> ---------------------------------------------------------------
>
> Key: CAMEL-2061
> URL: https://issues.apache.org/activemq/browse/CAMEL-2061
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Chris Purcell
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.4.0
>
>
> The following class turns a MockEndpoint into a very capable bean for use in Camel route unit tests:
> public class MockEndpointBean extends MockEndpoint {
> @Handler
> public void handle(Exchange exchange) throws Exception {
> onExchange(exchange);
> }
> }
> If this public method were added to MockEndpont, the subclass would not be necessary. A Spring Camel route could use the following bean:
> <bean id="myBean" class="org.apache.camel.component.mock.MockEndpoint" />
> and inject the endpoint into any unit test:
> @EndpointInject
> private MockEndpoint myBean;
> and then control the behaviour of the bean like any other MockEndpoint using the powerful when and assert methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2061) Make MockEndpoint double as a bean for
use in Camel route tests
Posted by "Chris Purcell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Purcell updated CAMEL-2061:
---------------------------------
Priority: Minor (was: Major)
> Make MockEndpoint double as a bean for use in Camel route tests
> ---------------------------------------------------------------
>
> Key: CAMEL-2061
> URL: https://issues.apache.org/activemq/browse/CAMEL-2061
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Chris Purcell
> Priority: Minor
> Fix For: Future
>
>
> The following class turns a MockEndpoint into a very capable bean for use in Camel route unit tests:
> public class MockEndpointBean extends MockEndpoint {
> @Handler
> public void handle(Exchange exchange) throws Exception {
> onExchange(exchange);
> }
> }
> If this public method were added to MockEndpont, the subclass would not be necessary. A Spring Camel route could use the following bean:
> <bean id="myBean" class="org.apache.camel.component.mock.MockEndpoint" />
> and inject the endpoint into any unit test:
> @EndpointInject
> private MockEndpoint myBean;
> and then control the behaviour of the bean like any other MockEndpoint using the powerful when and assert methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.