org.mule.module.ibeans.annotations
Class AbstractIBeansTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.tck.junit4.AbstractMuleContextTestCase
          extended by org.mule.module.ibeans.annotations.AbstractIBeansTestCase
Direct Known Subclasses:
CallVoidReturnTestCase, ErrorFiltersTestCase, ExceptionListenerTestCase, IBeansHolderConfigBuilderTestCase, ImplicitPropertiesInFactoryTestCase, MockIBeanTestCase, OptionalParamsTestCase, ParamFactoryTestCase, ReturnAnnotationTestCase, TextUsageViewTestCase, UriEncodingTestCase, UriParamFilterTestCase

public abstract class AbstractIBeansTestCase
extends AbstractMuleContextTestCase


Field Summary
protected  org.ibeans.spi.IBeansPlugin plugin
           
 
Fields inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, RECEIVE_TIMEOUT, TEST_MESSAGE
 
Fields inherited from class org.mule.tck.junit4.AbstractMuleTestCase
DEFAULT_TEST_TIMEOUT_SECS, globalTimeout, logger, name, TEST_TIMEOUT_SYSTEM_PROPERTY
 
Constructor Summary
protected AbstractIBeansTestCase()
           
 
Method Summary
protected  void addBuilders(List<ConfigurationBuilder> builders)
           
protected  org.ibeans.spi.IBeansPlugin createPlugin()
           
protected  void doSetUp()
          Enables the adding of extra behavior on the set up stage of a test right after the creation of the mule context in AbstractMuleContextTestCase.setUpMuleContext().
protected
<T> T
getDataAs(InputStream data, org.ibeans.api.DataType<T> as)
           
protected
<T> T
loadData(String resource, org.ibeans.api.DataType<T> type)
           
protected  org.mockito.stubbing.Answer withAtomData(String resource, Object ibean)
           
protected  org.mockito.stubbing.Answer withData(String resource, Class returnType)
          A mock return for a method call that will load data and transform it into the return type set on the iBean.
protected  org.mockito.stubbing.Answer withData(String resource, org.ibeans.api.channel.MimeType mimeType, org.ibeans.impl.test.MockMessageCallback callback, Object ibean)
          A mock return for a method call that will load data and transform it into the return type set on the iBean.
protected  org.mockito.stubbing.Answer withJsonData(String resource, Object ibean)
           
protected  org.mockito.stubbing.Answer withRssData(String resource, Object ibean)
           
protected  org.mockito.stubbing.Answer withTextData(String resource, Object ibean)
           
protected  org.mockito.stubbing.Answer withXmlData(String resource, Object ibean)
           
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doTearDown, getBuilder, getConfigurationResources, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestEventUsingFlow, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, initialiseObject, isDisposeContextPerClass, isGracefulShutdown, isStartContext, setDisposeContextPerClass, setStartContext, setUpMuleContext
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleTestCase
clearExcludedFlag, clearRequestContext, createTestTimeoutRule, getTestHeader, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isExcluded, isFailOnTimeout, isOffline, isTestIncludedInExclusionFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

plugin

protected org.ibeans.spi.IBeansPlugin plugin
Constructor Detail

AbstractIBeansTestCase

protected AbstractIBeansTestCase()
Method Detail

createPlugin

protected org.ibeans.spi.IBeansPlugin createPlugin()

doSetUp

protected void doSetUp()
                throws Exception
Description copied from class: AbstractMuleContextTestCase
Enables the adding of extra behavior on the set up stage of a test right after the creation of the mule context in AbstractMuleContextTestCase.setUpMuleContext().

Under normal circumstances this method could be replaced by a @Before annotated method.

Overrides:
doSetUp in class AbstractMuleContextTestCase
Throws:
Exception - if something fails that should halt the test case

addBuilders

protected void addBuilders(List<ConfigurationBuilder> builders)
Overrides:
addBuilders in class AbstractMuleContextTestCase

withXmlData

protected org.mockito.stubbing.Answer withXmlData(String resource,
                                                  Object ibean)

withRssData

protected org.mockito.stubbing.Answer withRssData(String resource,
                                                  Object ibean)

withAtomData

protected org.mockito.stubbing.Answer withAtomData(String resource,
                                                   Object ibean)

withJsonData

protected org.mockito.stubbing.Answer withJsonData(String resource,
                                                   Object ibean)

withTextData

protected org.mockito.stubbing.Answer withTextData(String resource,
                                                   Object ibean)

withData

protected org.mockito.stubbing.Answer withData(String resource,
                                               Class returnType)
A mock return for a method call that will load data and transform it into the return type set on the iBean.

Parameters:
resource - the resource file name that contains the data you wish to load
returnType - the Java type that the data should be converted to
Returns:
a Mockito Answer implementation that will load the data when requested

withData

protected org.mockito.stubbing.Answer withData(String resource,
                                               org.ibeans.api.channel.MimeType mimeType,
                                               org.ibeans.impl.test.MockMessageCallback callback,
                                               Object ibean)
A mock return for a method call that will load data and transform it into the return type set on the iBean.

Parameters:
resource - the resource file name that contains the data you wish to load
ibean - the ibean that is being tested
mimeType - the mime type of the data
callback - a callback can be used to manipulate the MuleMessage before it it gets returned
Returns:
a Mockito Answer implementation that will load the data when requested

loadData

protected <T> T loadData(String resource,
                         org.ibeans.api.DataType<T> type)
              throws IOException,
                     TransformerException
Throws:
IOException
TransformerException

getDataAs

protected <T> T getDataAs(InputStream data,
                          org.ibeans.api.DataType<T> as)
               throws TransformerException
Throws:
TransformerException


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.