use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class JavaDeclarationDelegateTestCase method flowListeningOperationWithoutAttributes.
@Test
public void flowListeningOperationWithoutAttributes() {
setLoader(loaderFor(VeganExtension.class));
ExtensionDeclarer declarer = declareExtension();
final ExtensionDeclaration declaration = declarer.getDeclaration();
OperationDeclaration operation = getOperation(getConfiguration(declaration, BANANA), "getLunch");
assertThat(operation, is(notNullValue()));
assertOutputType(operation.getOutput(), toMetadataType(Fruit.class), false);
assertOutputType(operation.getOutputAttributes(), TYPE_BUILDER.voidType().build(), false);
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class JavaDeclarationDelegateTestCase method minMuleVersionIsDescribedCorrectly.
@Test
public void minMuleVersionIsDescribedCorrectly() {
setLoader(loaderFor(HeisenbergExtension.class));
ExtensionDeclarer declarer = declareExtension();
final ExtensionDeclaration declaration = declarer.getDeclaration();
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class JavaDeclarationDelegateTestCase method describeTestModule.
@Test
public void describeTestModule() throws Exception {
ExtensionDeclarer declarer = declareExtension();
ExtensionDeclaration extensionDeclaration = declarer.getDeclaration();
assertExtensionProperties(extensionDeclaration, HEISENBERG);
assertTestModuleConfiguration(extensionDeclaration);
assertTestModuleOperations(extensionDeclaration);
assertTestModuleConnectionProviders(extensionDeclaration);
assertTestModuleMessageSource(extensionDeclaration);
assertModelProperties(extensionDeclaration);
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class JavaDeclarationDelegateTestCase method flyweight.
@Test
public void flyweight() {
setLoader(loaderFor(VeganExtension.class));
ExtensionDeclarer declarer = declareExtension();
final ExtensionDeclaration declaration = declarer.getDeclaration();
final ConfigurationDeclaration appleConfiguration = findDeclarationByName(declaration.getConfigurations(), APPLE);
final ConfigurationDeclaration bananaConfiguration = findDeclarationByName(declaration.getConfigurations(), BANANA);
final String sourceName = PaulMcCartneySource.class.getSimpleName();
SourceDeclaration appleSource = findDeclarationByName(appleConfiguration.getMessageSources(), sourceName);
SourceDeclaration bananaSource = findDeclarationByName(bananaConfiguration.getMessageSources(), sourceName);
assertThat(appleSource, is(sameInstance(bananaSource)));
final String operationName = "spreadTheWord";
OperationDeclaration appleOperation = findDeclarationByName(appleConfiguration.getOperations(), operationName);
OperationDeclaration bananaOperation = findDeclarationByName(bananaConfiguration.getOperations(), operationName);
assertThat(appleOperation, is(sameInstance(bananaOperation)));
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class JavaDeclarationDelegateTestCase method heisenbergPointer.
@Test
public void heisenbergPointer() throws Exception {
setLoader(loaderFor(HeisenbergPointer.class));
ExtensionDeclarer declarer = declareExtension();
ExtensionDeclaration extensionDeclaration = declarer.getDeclaration();
assertExtensionProperties(extensionDeclaration, OTHER_HEISENBERG);
assertTestModuleConfiguration(extensionDeclaration);
assertTestModuleOperations(extensionDeclaration);
assertTestModuleConnectionProviders(extensionDeclaration);
assertTestModuleMessageSource(extensionDeclaration);
assertModelProperties(extensionDeclaration);
}
Aggregations