public abstract class ExtensionFunctionalTestCase extends FunctionalTestCase
FunctionalTestCases that make use of components generated through the extensions API.
The value added by this class in comparison to a traditional FunctionalTestCase is that before creating the
MuleContext, it creates a ExtensionManager and automatically registers extensions pointed by
getAnnotatedExtensionClasses() methods.
Once extensions are registered, a ResourcesGenerator is used to automatically generate any backing resources needed
(XSD schemas, spring bundles, etc).
In this way, the user experience is greatly simplified when running the test either through an IDE or build tool such as maven
or gradle.
Since this class extends FunctionalTestCase, a new MuleContext is created per each test. That also means that a
new ExtensionManager is created per test.muleDisableAsyncRetryPolicyOnSourcesProperty, registryBLOCK_TIMEOUT, componentLocator, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, NON_GRACEFUL_SHUTDOWN_TIMEOUT, RECEIVE_TIMEOUT, TEST_MESSAGE, testServicesConfigurationBuilder, testServicesConfigurationBuilderSupplier, WORKING_DIRECTORY_SYSTEM_PROPERTY_KEY, workingDirectorychain, DEFAULT_TEST_TIMEOUT_SECS, name, TEST_CONNECTOR, TEST_CONNECTOR_LOCATION, TEST_PAYLOAD, TEST_TIMEOUT_SYSTEM_PROPERTY, TESTING_MODE_PROPERTY_NAME| Constructor and Description |
|---|
ExtensionFunctionalTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBuilders(List<org.mule.runtime.core.api.config.ConfigurationBuilder> builders)
Adds a
ConfigurationBuilder that sets the extensionManager into the AbstractMuleContextTestCase.muleContext. |
protected Class<?>[] |
getAnnotatedExtensionClasses()
Implement this method to limit the amount of extensions initialised by providing the annotated classes which define the
extensions that you actually want to use for this test.
|
protected org.mule.runtime.extension.api.loader.ExtensionModelLoader |
getExtensionModelLoader() |
clearFlowAssertions, disableXmlValidations, doTearDown, enableLazyInit, flowRunner, getBuilder, getConfigFile, getConfigFiles, getConfigResources, getExecutionClassLoader, getFlowConstruct, loadResource, loadResourceAsString, runFlow, stopFlowConstructconfigureMuleContext, createMuleContext, disposeContext, disposeContextPerTest, doSetUp, doSetUpBeforeMuleContextCreation, doTearDownAfterMuleContextDispose, doTestClassInjection, getAppleFlowComponentLocationAnnotations, getConfigurationResources, getDeploymentProperties, getEventBuilder, getFileInsideWorkingDirectory, getFlowComponentLocationAnnotations, getObjectSerializer, getPayload, getPayload, getPayloadAsBytes, getPayloadAsString, getSensingNullMessageProcessor, getStartUpRegistryObjects, getTriggerableMessageSource, getWorkingDirectory, isDisposeContextPerClass, isGracefulShutdown, isStartContext, mockExprExecutorService, mockHttpService, process, recordSchedulersOnInit, setDisposeContextPerClass, setStartContext, setUpMuleContext, verifyAndStopSchedulersaddMockComponentLocation, clearRequestContext, clearTestCaseName, clearTestEvents, collectThreadNames, createTestTimeoutRule, dumpFilteredThreadsInTest, getMavenProjectVersionProperty, getTestHeader, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isFailOnTimeout, isOffline, newEvent, nullPayloadEvent, takeTestCaseName, testEventprotected Class<?>[] getAnnotatedExtensionClasses()
null or empty array forces the
ExtensionManager to perform a full classpath discovery. Default implementation of this method returns null.protected void addBuilders(List<org.mule.runtime.core.api.config.ConfigurationBuilder> builders)
ConfigurationBuilder that sets the extensionManager into the AbstractMuleContextTestCase.muleContext. This
ConfigurationBuilder is set as the first element of the builders ListaddBuilders in class AbstractMuleContextTestCasebuilders - the list of ConfigurationBuilders that will be used to initialise the AbstractMuleContextTestCase.muleContextprotected org.mule.runtime.extension.api.loader.ExtensionModelLoader getExtensionModelLoader()
Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.