use of org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate 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);
}
use of org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate in project mule by mulesoft.
the class DynamicMetadataDeclarationEnricherTestCase method setUp.
@Before
public void setUp() {
DefaultJavaModelLoaderDelegate loader = new DefaultJavaModelLoaderDelegate(MetadataExtension.class, getProductVersion());
ExtensionDeclarer declarer = loader.declare(new DefaultExtensionLoadingContext(getClass().getClassLoader(), getDefault(emptySet())));
new DynamicMetadataDeclarationEnricher().enrich(new DefaultExtensionLoadingContext(declarer, this.getClass().getClassLoader(), getDefault(emptySet())));
declaration = declarer.getDeclaration();
}
use of org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate in project mule by mulesoft.
the class BooleanParameterDeclarationEnricherTestCase method setUp.
@Before
public void setUp() {
ExtensionDeclarer declarer = new DefaultJavaModelLoaderDelegate(HeisenbergExtension.class, getProductVersion()).declare(new DefaultExtensionLoadingContext(getClass().getClassLoader(), getDefault(emptySet())));
new BooleanParameterDeclarationEnricher().enrich(new DefaultExtensionLoadingContext(declarer, this.getClass().getClassLoader(), getDefault(emptySet())));
declaration = declarer.getDeclaration();
}
use of org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method setUp.
@Before
public void setUp() {
String version = getProductVersion();
ClassLoader cl = getClass().getClassLoader();
DefaultExtensionLoadingContext loadingCtx = new DefaultExtensionLoadingContext(cl, DSL_CTX);
DefaultJavaModelLoaderDelegate heisenbergLoader = new DefaultJavaModelLoaderDelegate(HeisenbergExtension.class, version);
DefaultJavaModelLoaderDelegate marvelLoader = new DefaultJavaModelLoaderDelegate(MarvelExtension.class, version);
heisenbergDeclarer = heisenbergLoader.declare(loadingCtx);
marvelDeclarer = marvelLoader.declare(loadingCtx);
DisplayDeclarationEnricher enricher = new DisplayDeclarationEnricher();
enricher.enrich(new DefaultExtensionLoadingContext(heisenbergDeclarer, cl, DSL_CTX));
enricher.enrich(new DefaultExtensionLoadingContext(marvelDeclarer, cl, DSL_CTX));
}
use of org.mule.runtime.module.extension.internal.loader.java.DefaultJavaModelLoaderDelegate in project mule by mulesoft.
the class JavaConfigurationDeclarationEnricherTestCase method setUp.
@Before
public void setUp() {
ExtensionDeclarer declarer = new DefaultJavaModelLoaderDelegate(HeisenbergExtension.class, getProductVersion()).declare(new DefaultExtensionLoadingContext(getClass().getClassLoader(), getDefault(emptySet())));
new JavaConfigurationDeclarationEnricher().enrich(new DefaultExtensionLoadingContext(declarer, this.getClass().getClassLoader(), getDefault(emptySet())));
declaration = declarer.getDeclaration();
}
Aggregations