Class LanguageTestSupport

  • All Implemented Interfaces:
    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

    public abstract class LanguageTestSupport
    extends ExchangeTestSupport
    A useful base class for testing the language plugins in Camel
    • Constructor Detail

      • LanguageTestSupport

        public LanguageTestSupport()
    • Method Detail

      • getLanguageName

        protected abstract String getLanguageName()
      • assertPredicate

        protected void assertPredicate​(String expression)
        Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to true
      • assertPredicateFails

        protected void assertPredicateFails​(String expression)
        Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to false
      • assertPredicate

        protected void assertPredicate​(String expression,
                                       boolean expected)
        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

        protected void assertExpression​(String expressionText,
                                        Object expectedValue)
        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