From e66469da55d83942fe89ff37d6b9091203f7033b Mon Sep 17 00:00:00 2001 From: JiriOndrusek Date: Fri, 7 Jun 2024 15:11:27 +0200 Subject: [PATCH] Making several configuration mehtods for TestSupport protected. --- .../camel/test/junit5/CamelContextConfiguration.java | 8 ++++---- .../camel/test/junit5/TestExecutionConfiguration.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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 aaf6cbcbd218f..c5a202492ab01 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 @@ -33,7 +33,7 @@ /** * Configures a context for test execution */ -public final class CamelContextConfiguration { +public class CamelContextConfiguration { @FunctionalInterface public interface CamelContextSupplier { CamelContext createCamelContext() throws Exception; @@ -228,7 +228,7 @@ public CamelContextSupplier camelContextSupplier() { * * @param camelContextSupplier A supplier for the Camel context */ - CamelContextConfiguration withCamelContextSupplier( + protected CamelContextConfiguration withCamelContextSupplier( CamelContextSupplier camelContextSupplier) { this.camelContextSupplier = camelContextSupplier; return this; @@ -285,7 +285,7 @@ public RoutesSupplier routesSupplier() { /** * A supplier that classes can use to create a {@link RouteBuilder} to define the routes for testing */ - CamelContextConfiguration withRoutesSupplier( + protected CamelContextConfiguration withRoutesSupplier( RoutesSupplier routesSupplier) { this.routesSupplier = routesSupplier; return this; @@ -314,7 +314,7 @@ public PostProcessor postProcessor() { * * @param postProcessor the post-test processor to use */ - CamelContextConfiguration withPostProcessor( + protected CamelContextConfiguration withPostProcessor( PostProcessor postProcessor) { this.postProcessor = postProcessor; return this; diff --git a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestExecutionConfiguration.java b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestExecutionConfiguration.java index 8614e27f4692d..26ad70e13f0de 100644 --- a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestExecutionConfiguration.java +++ b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestExecutionConfiguration.java @@ -106,7 +106,7 @@ public boolean isUseAdviceWith() { * @return true if you use advice with in your unit tests. */ @Deprecated(since = "4.7.0") - TestExecutionConfiguration withUseAdviceWith(boolean useAdviceWith) { + protected TestExecutionConfiguration withUseAdviceWith(boolean useAdviceWith) { this.useAdviceWith = useAdviceWith; return this; } @@ -129,7 +129,7 @@ public boolean isCreateCamelContextPerClass() { * @return true per class, false per test. */ @Deprecated(since = "4.7.0") - TestExecutionConfiguration withCreateCamelContextPerClass(boolean createCamelContextPerClass) { + protected TestExecutionConfiguration withCreateCamelContextPerClass(boolean createCamelContextPerClass) { this.createCamelContextPerClass = createCamelContextPerClass; return this; }