essobedo opened a new pull request #6929:
URL: https://github.com/apache/camel/pull/6929


   Fix for https://issues.apache.org/jira/browse/CAMEL-17633
   
   - [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
(usually before you start working on it).  Trivial changes like typos do not 
require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
   - [x] Each commit in the pull request should have a meaningful subject line 
and body.
   - [x] If you're unsure, you can format the pull request title like 
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` 
with the appropriate JIRA issue.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Run `mvn clean install -Psourcecheck` in your module with source check 
enabled to make sure basic checks pass and there are no checkstyle violations. 
A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   
   ## Motivation
   
   So far only JUnit 4 is supported when we use Camel CDI. The goal of this 
task is to support also JUnit 5 in order to allow the end users to be able to 
benefit from new features that it provides.
   
   ## Motivations:
   
   * Add a new module/artifact `camel-test-cdi-junit5` based on  
`camel-test-cdi`
   * Support all the use-cases described in the current documentation 
https://camel.apache.org/components/3.14.x/others/test-cdi.html
   * Deprecate `camel-test-cdi`
   * Replace the old JUnit runner `CamelCdiRunner` with the extension 
`CamelCdiExtension`
   * Remove the annotation `Order` as it is managed out of the box by JUnit 5
   * Add a new extension `AdviceRoute` to manage the way to advice routes
   
   In the next example, the `AdviceWithRouteBuilder` of type 
`ReplaceDirectWithMockBuilder` advices the
    route whose identifier is `main-route`.
   
   ```
   ----
   @ExtendWith(CamelCdiExtension.class)
   public class CamelCdiTest {
       @AdviceRoute("main-route")
       public class ReplaceDirectWithMockBuilder extends AdviceWithRouteBuilder 
{
           @Override
           public void configure() throws Exception {
               weaveByToUri("direct:out").replace().to("mock:test");
           }
       }
   }
   ```
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to