Package org.apache.camel.test.junit5
Class LanguageTestSupport
java.lang.Object
org.apache.camel.test.junit5.AbstractTestSupport
org.apache.camel.test.junit5.CamelTestSupport
org.apache.camel.test.junit5.ExchangeTestSupport
org.apache.camel.test.junit5.LanguageTestSupport
- All Implemented Interfaces:
CommonTestSupport
,org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.AfterEachCallback
,org.junit.jupiter.api.extension.AfterTestExecutionCallback
,org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.BeforeTestExecutionCallback
,org.junit.jupiter.api.extension.Extension
A useful base class for testing the language plugins in Camel
-
Field Summary
Fields inherited from class org.apache.camel.test.junit5.ExchangeTestSupport
exchange
Fields inherited from class org.apache.camel.test.junit5.CamelTestSupport
camelTestSupportExtension, testLoggerExtension
Fields inherited from class org.apache.camel.test.junit5.AbstractTestSupport
camelContextConfiguration, consumer, context, fluentTemplate, template, testConfigurationBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
assertExpression
(String expressionText, Object expectedValue) Asserts that this language expression evaluates to the given value on the current exchangeprotected void
assertExpression
(String expressionText, String expectedValue, String orThisExpectedValue) Asserts that the expression evaluates to one of the two given valuesprotected void
assertExpression
(org.apache.camel.Exchange exchange, String expressionText, Object expectedValue) Asserts that this language expression evaluates to the given value on the given exchangeprotected void
assertPredicate
(String expression) Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to trueprotected void
assertPredicate
(String expression, boolean expected) Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to the expected valueprotected void
assertPredicate
(org.apache.camel.Exchange exchange, String expression, boolean expected) protected void
assertPredicateFails
(String expression) Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to falseprotected abstract String
Methods inherited from class org.apache.camel.test.junit5.ExchangeTestSupport
createExchange, doPostSetup, populateExchange
Methods inherited from class org.apache.camel.test.junit5.CamelTestSupport
afterAll, afterEach, afterTestExecution, applyCamelPostProcessor, assertExpression, assertPredicate, assertResolveLanguage, assertValidContext, beforeAll, beforeEach, beforeTestExecution, bindToRegistry, createCamelContext, createCamelRegistry, createExchangeWithBody, createRouteBuilder, createRouteBuilders, debugAfter, debugBefore, doPostTearDown, doPreSetup, doQuarkusCheck, doSetUp, doSpringBootCheck, getCurrentTestName, getMandatoryEndpoint, getMandatoryEndpoint, getMockEndpoint, getMockEndpoint, getShutdownTimeout, hasClassAnnotation, postProcessTest, resolveMandatoryEndpoint, resolveMandatoryEndpoint, sendBodies, sendBody, sendBody, setUp, startCamelContext, stopCamelContext, tearDown, timeTaken, unsupportedCheck
Methods inherited from class org.apache.camel.test.junit5.AbstractTestSupport
camelContextConfiguration, camelContextService, cleanupResources, consumer, context, disableJMX, enableJMX, fluentTemplate, getCamelContextService, getRouteFilterExcludePattern, getRouteFilterIncludePattern, ignoreMissingLocationWithPropertiesComponent, isCreateCamelContextPerClass, isDumpRouteCoverage, isMockEndpoints, isMockEndpointsAndSkip, isRouteCoverageEnabled, isUseAdviceWith, isUseDebugger, isUseRouteBuilder, replaceRouteFromWith, setCamelContextService, setContext, setupResources, setUseRouteBuilder, template, testConfiguration, useJmx, useOverridePropertiesWithPropertiesComponent
-
Constructor Details
-
LanguageTestSupport
public LanguageTestSupport()
-
-
Method Details
-
getLanguageName
-
assertPredicate
Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to true -
assertPredicateFails
Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to false -
assertPredicate
Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to the expected value -
assertPredicate
protected void assertPredicate(org.apache.camel.Exchange exchange, String expression, boolean expected) -
assertExpression
protected void assertExpression(org.apache.camel.Exchange exchange, String expressionText, Object expectedValue) Asserts that this language expression evaluates to the given value on the given exchange -
assertExpression
Asserts that this language expression evaluates to the given value on the current exchange -
assertExpression
protected void assertExpression(String expressionText, String expectedValue, String orThisExpectedValue) Asserts that the expression evaluates to one of the two given values
-