org.apache.camel.test.junit4
Class LanguageTestSupport

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.camel.test.junit4.TestSupport
          extended by org.apache.camel.test.junit4.CamelTestSupport
              extended by org.apache.camel.test.junit4.ExchangeTestSupport
                  extended by org.apache.camel.test.junit4.LanguageTestSupport

public abstract class LanguageTestSupport
extends ExchangeTestSupport

A useful base class for testing the language plugins in Camel


Field Summary
 
Fields inherited from class org.apache.camel.test.junit4.ExchangeTestSupport
exchange
 
Fields inherited from class org.apache.camel.test.junit4.CamelTestSupport
camelContextService, consumer, context, template
 
Fields inherited from class org.apache.camel.test.junit4.TestSupport
log, LS, testName
 
Constructor Summary
LanguageTestSupport()
           
 
Method Summary
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
protected  void assertExpression(String expressionText, Object expectedValue)
          Asserts that this language expression evaluates to the given value on the current exchange
protected  void assertExpression(String expressionText, String expectedValue, String orThisExpectedValue)
          Asserts that the expression evaluates to one of the two given values
protected  void assertPredicate(org.apache.camel.Exchange exchange, String expression, boolean expected)
           
protected  void assertPredicate(String expression)
          Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to true
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
protected  void assertPredicateFails(String expression)
          Asserts that the given predicate expression evaluated on the current language and message exchange evaluates to false
protected abstract  String getLanguageName()
           
 
Methods inherited from class org.apache.camel.test.junit4.ExchangeTestSupport
createExchange, populateExchange, setUp
 
Methods inherited from class org.apache.camel.test.junit4.CamelTestSupport
assertExpression, assertMockEndpointsSatisfied, assertMockEndpointsSatisfied, assertPredicate, assertResolveLanguage, assertValidContext, camelContextService, consumer, context, createCamelContext, createExchangeWithBody, createJndiContext, createRegistry, createRouteBuilder, createRouteBuilders, debugAfter, debugBefore, disableJMX, doPostSetup, doPreSetup, enableJMX, getCamelContextService, getMandatoryEndpoint, getMandatoryEndpoint, getMockEndpoint, getShutdownTimeout, isCreateCamelContextPerClass, isLazyLoadingTypeConverter, isMockEndpoints, isUseAdviceWith, isUseDebugger, isUseRouteBuilder, postProcessTest, resetMocks, resolveMandatoryEndpoint, resolveMandatoryEndpoint, sendBodies, sendBody, sendBody, setCamelContextService, setUseRouteBuilder, startCamelContext, stopCamelContext, tearDown, tearDownAfterClass, template, useJmx
 
Methods inherited from class org.apache.camel.test.junit4.TestSupport
assertCollectionSize, assertCollectionSize, assertDirectoryEquals, assertDirectoryEquals, assertEndpointUri, assertExpression, assertFileExists, assertInMessageBodyEquals, assertInMessageHeader, assertIsInstanceOf, assertListSize, assertListSize, assertMessageHeader, assertOneElement, assertOutMessageBodyEquals, assertOutMessageHeader, assertPredicate, assertPredicateDoesNotMatch, assertPredicateMatches, assertStringContains, body, bodyAs, createDirectory, createExchangeWithBody, deleteDirectory, deleteDirectory, faultBody, faultBodyAs, getRouteList, getTestMethodName, header, isJava15, isJavaVendor, isPlatform, outBody, outBodyAs, property, resolveMandatoryEndpoint, resolveMandatoryEndpoint, systemProperty, systemProperty, unwrap, unwrapChannel
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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



Apache CAMEL