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)));
}
Aggregations