Search in sources :

Example 1 with ExtensionDescriptionsEnricher

use of org.mule.runtime.module.extension.internal.loader.enricher.ExtensionDescriptionsEnricher in project mule by mulesoft.

the class ExtensionDescriptionDocumenterTestCase method loadDocumentationFromFile.

@Test
public void loadDocumentationFromFile() {
    ClassLoader cl = currentThread().getContextClassLoader();
    ExtensionLoadingContext ctx = new DefaultExtensionLoadingContext(cl, getDefault(emptySet()));
    DefaultJavaModelLoaderDelegate loader = new DefaultJavaModelLoaderDelegate(extensionClass, "1.0.0-dev");
    loader.declare(ctx);
    ExtensionDescriptionsEnricher enricher = new ExtensionDescriptionsEnricher();
    enricher.enrich(ctx);
    ExtensionModelFactory factory = new ExtensionModelFactory();
    ExtensionModel extensionModel = factory.create(ctx);
    assertDescribedExtensionModel(extensionModel);
}
Also used : ExtensionDescriptionsEnricher(org.mule.runtime.module.extension.internal.loader.enricher.ExtensionDescriptionsEnricher) DefaultExtensionLoadingContext(org.mule.runtime.extension.internal.loader.DefaultExtensionLoadingContext) ExtensionLoadingContext(org.mule.runtime.extension.api.loader.ExtensionLoadingContext) DefaultExtensionLoadingContext(org.mule.runtime.extension.internal.loader.DefaultExtensionLoadingContext) DefaultJavaModelLoaderDelegate(org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) ExtensionModelFactory(org.mule.runtime.extension.internal.loader.ExtensionModelFactory) SmallTest(org.mule.tck.size.SmallTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)1 ExtensionLoadingContext (org.mule.runtime.extension.api.loader.ExtensionLoadingContext)1 DefaultExtensionLoadingContext (org.mule.runtime.extension.internal.loader.DefaultExtensionLoadingContext)1 ExtensionModelFactory (org.mule.runtime.extension.internal.loader.ExtensionModelFactory)1 ExtensionDescriptionsEnricher (org.mule.runtime.module.extension.internal.loader.enricher.ExtensionDescriptionsEnricher)1 DefaultJavaModelLoaderDelegate (org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate)1 SmallTest (org.mule.tck.size.SmallTest)1