This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch mock in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4194f10f1da2625b8931e0af4a31e6fd95d92f4d Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Apr 16 12:11:01 2019 +0200 Move mock component out of camel-core. Work in progress. --- .../src/main/java/org/apache/camel/builder/ValueBuilder.java | 11 ----------- .../org/apache/camel/issues/TryCatchWithSplitIssueTest.java | 4 ++-- .../camel/processor/onexception/OnExceptionHandledTest.java | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java b/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java index b521537..ffe3465 100644 --- a/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java +++ b/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java @@ -337,17 +337,6 @@ public class ValueBuilder implements Expression, Predicate { } /** - * Invokes the method with the given name. - * - * @param methodName name of method to invoke. - * @return the current builder - */ - public ValueBuilder method(String methodName) { - Expression newExp = ExpressionBuilder.beanExpression(expression + "?method=" + methodName); - return onNewValueBuilder(newExp); - } - - /** * Negates the built expression. * * @return the current builder diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java index 20b178e..83c2ed8 100644 --- a/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java @@ -30,7 +30,7 @@ public class TryCatchWithSplitIssueTest extends ContextTestSupport { MockEndpoint error = getMockEndpoint("mock:error"); error.expectedBodiesReceived("James"); error.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).isNotNull(); - error.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).method("getMessage").isEqualTo("This is a dummy error James!"); + error.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class); MockEndpoint result = getMockEndpoint("mock:result"); result.expectedBodiesReceived("Hi Claus", "Hi Willem"); @@ -45,7 +45,7 @@ public class TryCatchWithSplitIssueTest extends ContextTestSupport { MockEndpoint error = getMockEndpoint("mock:error"); error.expectedBodiesReceived("James"); error.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).isNotNull(); - error.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).method("getMessage").isEqualTo("This is a dummy error James!"); + error.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class); template.sendBody("direct:start", "James"); diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java index 0d02081..dea9ca9 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandledTest.java @@ -30,7 +30,6 @@ public class OnExceptionHandledTest extends ContextTestSupport { mock.expectedBodiesReceived("Hello World"); mock.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).isNotNull(); mock.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class); - mock.message(0).exchangeProperty(Exchange.EXCEPTION_CAUGHT).method("getMessage").isEqualTo("Forced"); template.sendBody("direct:start", "Hello World");