This is an automated email from the ASF dual-hosted git repository.

apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new e92e25145e0 feat: Expose 
org.apache.camel.test.junit5.CamelContextConfiguration.replaceRouteFromWith(String,
 String) as API
e92e25145e0 is described below

commit e92e25145e0807426551534628f4744c64604910
Author: Aurélien Pupier <apup...@redhat.com>
AuthorDate: Tue Apr 15 11:49:56 2025 +0200

    feat: Expose
    
org.apache.camel.test.junit5.CamelContextConfiguration.replaceRouteFromWith(String,
    String) as API
    
    This would be convenient to replace the deprecated
    
org.apache.camel.test.junit5.AbstractTestSupport.replaceRouteFromWith(String,
    String)
    
    A workaround avoiding deprecated API is currently to use:
    ```
        @Override
        public void configureContext(CamelContextConfiguration
    camelContextConfiguration) {
            super.configureContext(camelContextConfiguration);
            camelContextConfiguration.fromEndpoints().put(routeId,
    "direct:in");
        }
    ```
    
    Signed-off-by: Aurélien Pupier <apup...@redhat.com>
---
 .../java/org/apache/camel/test/junit5/CamelContextConfiguration.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelContextConfiguration.java
 
b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelContextConfiguration.java
index 2f82c5cb9e8..62ab799c629 100644
--- 
a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelContextConfiguration.java
+++ 
b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelContextConfiguration.java
@@ -335,7 +335,7 @@ public class CamelContextConfiguration {
      * @param routeId
      * @param fromEndpoint
      */
-    void replaceRouteFromWith(String routeId, String fromEndpoint) {
+    public void replaceRouteFromWith(String routeId, String fromEndpoint) {
         fromEndpoints.put(routeId, fromEndpoint);
     }
 

Reply via email to