Search in sources :

Example 1 with ExtensionsTestInfrastructureDiscoverer

use of org.mule.test.runner.infrastructure.ExtensionsTestInfrastructureDiscoverer in project mule by mulesoft.

the class ExtensionFunctionalTestCase method createExtensionsManager.

private void createExtensionsManager(MuleContext muleContext) throws Exception {
    extensionManager = new DefaultExtensionManager();
    File generatedResourcesDirectory = getGenerationTargetDirectory();
    muleContext.setExtensionManager(extensionManager);
    initialiseIfNeeded(extensionManager, muleContext);
    ExtensionsTestInfrastructureDiscoverer discoverer = new ExtensionsTestInfrastructureDiscoverer(extensionManager);
    for (Class<?> annotatedClass : getAnnotatedExtensionClasses()) {
        discoverer.discoverExtension(annotatedClass, getExtensionModelLoader());
    }
    generateResourcesAndAddToClasspath(generatedResourcesDirectory, copyOf(discoverer.generateDslResources(generatedResourcesDirectory)));
}
Also used : ExtensionsTestInfrastructureDiscoverer(org.mule.test.runner.infrastructure.ExtensionsTestInfrastructureDiscoverer) File(java.io.File) DefaultExtensionManager(org.mule.runtime.module.extension.internal.manager.DefaultExtensionManager)

Aggregations

File (java.io.File)1 DefaultExtensionManager (org.mule.runtime.module.extension.internal.manager.DefaultExtensionManager)1 ExtensionsTestInfrastructureDiscoverer (org.mule.test.runner.infrastructure.ExtensionsTestInfrastructureDiscoverer)1