use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.PointcutTagMigrationStep in project mule-migration-assistant by mulesoft.
the class PointcutTagMigrationStepTestCase method convertRawPointcutTag.
@Test
public void convertRawPointcutTag() {
final PointcutTagMigrationStep step = new PointcutTagMigrationStep();
step.setApplicationModel(appModel);
Element element = getTestElement();
step.execute(element, reportMock);
assertProxyAndSourceElements(element, 1);
assertExecuteNextElement((Element) element.getContent(0), 0);
verify(reportMock).report("basicStructure.pointcutMigrationStepUnknown", element, element, "Unknown");
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.PointcutTagMigrationStep in project mule-migration-assistant by mulesoft.
the class PointcutTagMigrationStepTestCase method convertResourcePoinctuTag.
@Test
public void convertResourcePoinctuTag() {
final PointcutTagMigrationStep step = new PointcutTagMigrationStep();
step.setApplicationModel(appModel);
Element element = getTestElement().addContent(new Element(API_POINTCUT_TAG_NAME, API_PLATFORM_GW_NAMESPACE).setAttribute(API_NAME_ATTR_NAME, API_NAME_ATTR_VALUE).setAttribute(API_VERSION_ATTR_NAME, API_VERSION_ATTR_VALUE)).addContent(new Element(RESOURCE_TAG_NAME).setAttribute(METHOD_REGEX_ATTR_NAME, METHOD_REGEX_ATTR_VALUE).setAttribute(URI_TEMPLATE_REGEX_ATTR_NAME, URI_TEMPLATE_REGEX_ATTR_VALUE));
step.execute(element, reportMock);
assertProxyAndSourceElements(element, 1);
assertExecuteNextElement((Element) element.getContent(0), 0);
verify(reportMock).report("basicStructure.pointcutMigrationStepResolvedByRuntime", element, element, "Resource");
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.PointcutTagMigrationStep in project mule-migration-assistant by mulesoft.
the class PointcutTagMigrationStepTestCase method convertAppPoinctuTag.
@Test
public void convertAppPoinctuTag() {
final PointcutTagMigrationStep step = new PointcutTagMigrationStep();
step.setApplicationModel(appModel);
Element element = getTestElement().addContent(new Element(APP_TAG_NAME).setAttribute(REGEX_ATTR_NAME, REGEX_ATTR_VALUE));
step.execute(element, reportMock);
assertProxyAndSourceElements(element, 1);
assertExecuteNextElement((Element) element.getContent(0), 0);
verify(reportMock).report("basicStructure.pointcutMigrationStepNoEquivalent", element, element, "App");
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.PointcutTagMigrationStep in project mule-migration-assistant by mulesoft.
the class BasicStructureMigrationTask method getSteps.
@Override
public List<MigrationStep> getSteps() {
PolicyFileRenameMigrationStep policyFileRenameMigrationStep = new PolicyFileRenameMigrationStep();
policyFileRenameMigrationStep.setApplicationModel(getApplicationModel());
List<MigrationStep> steps = new ArrayList<>();
steps.add(new PolicyTagMigrationStep());
steps.add(new BeforeTagMigrationStep());
steps.add(new AfterTagMigrationStep());
steps.add(new BeforeExceptionTagMigrationStep());
steps.add(new AfterExceptionTagMigrationStep());
steps.add(new PointcutTagMigrationStep());
steps.add(new DataTagMigrationStep());
steps.add(new CleanupAttributesMigrationStep());
steps.add(policyFileRenameMigrationStep);
return steps;
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.PointcutTagMigrationStep in project mule-migration-assistant by mulesoft.
the class PointcutTagMigrationStepTestCase method convertApiPlatformPoinctuTag.
@Test
public void convertApiPlatformPoinctuTag() {
final PointcutTagMigrationStep step = new PointcutTagMigrationStep();
step.setApplicationModel(appModel);
Element element = getTestElement().addContent(new Element(API_POINTCUT_TAG_NAME, API_PLATFORM_GW_NAMESPACE).setAttribute(API_NAME_ATTR_NAME, API_NAME_ATTR_VALUE).setAttribute(API_VERSION_ATTR_NAME, API_VERSION_ATTR_VALUE));
step.execute(element, reportMock);
assertProxyAndSourceElements(element, 1);
assertExecuteNextElement((Element) element.getContent(0), 0);
verify(reportMock).report("basicStructure.pointcutMigrationStepResolvedByRuntime", element, element, "Api");
}
Aggregations