Search in sources :

Example 1 with EmpireStereotype

use of org.mule.test.heisenberg.extension.stereotypes.EmpireStereotype in project mule by mulesoft.

the class DefaultExtensionModelFactoryTestCase method customStereotype.

@Test
public void customStereotype() {
    ExtensionModel extensionModel = createExtension(HeisenbergExtension.class);
    OperationModel operation = extensionModel.getConfigurationModels().get(0).getOperationModel("callSaul").get();
    StereotypeModel stereotypeModel = operation.getStereotype();
    assertThat(stereotypeModel.isAssignableTo(PROCESSOR), is(true));
    assertThat(stereotypeModel.getType(), is(new EmpireStereotype().getName().toUpperCase()));
    assertThat(stereotypeModel.getNamespace(), is(HEISENBERG.toUpperCase()));
    assertThat(stereotypeModel.getParent().get(), is(PROCESSOR));
}
Also used : StereotypeModel(org.mule.runtime.api.meta.model.stereotype.StereotypeModel) EmpireStereotype(org.mule.test.heisenberg.extension.stereotypes.EmpireStereotype) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test) SmallTest(org.mule.tck.size.SmallTest)

Aggregations

Test (org.junit.Test)1 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)1 OperationModel (org.mule.runtime.api.meta.model.operation.OperationModel)1 StereotypeModel (org.mule.runtime.api.meta.model.stereotype.StereotypeModel)1 SmallTest (org.mule.tck.size.SmallTest)1 EmpireStereotype (org.mule.test.heisenberg.extension.stereotypes.EmpireStereotype)1