use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.CleanupAttributesMigrationStep in project mule-migration-assistant by mulesoft.
the class CleanupAttributesMigrationStepTestCase method convertRawBeforeTag.
@Test
public void convertRawBeforeTag() {
final CleanupAttributesMigrationStep step = new CleanupAttributesMigrationStep();
Element element = getTestElement();
step.execute(element, reportMock);
assertMuleTagName(element, 0);
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.CleanupAttributesMigrationStep in project mule-migration-assistant by mulesoft.
the class CleanupAttributesMigrationStepTestCase method convertBeforeTagWithContent.
@Test
public void convertBeforeTagWithContent() {
final CleanupAttributesMigrationStep step = new CleanupAttributesMigrationStep();
Element sourceElement = new Element(SOURCE_TAG_NAME, HTTP_POLICY_NAMESPACE);
sourceElement.addContent(new Element(EXECUTE_NEXT_TAG_NAME, HTTP_POLICY_NAMESPACE));
sourceElement.addContent(new Element(GENERIC_TAG_NAME).setAttribute(GENERIC_TAG_ATTRIBUTE_NAME, GENERIC_TAG_ATTRIBUTE_VALUE));
Element element = getTestElement().addContent(new Element(PROXY_TAG_NAME, HTTP_POLICY_NAMESPACE).addContent(sourceElement));
step.execute(element, reportMock);
assertMuleTagName(element, 1);
final Element proxy = (Element) element.getContent(0);
assertProxyAndSourceElements(proxy, 2);
assertExecuteNextElement((Element) proxy.getContent(0), 0);
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.basicstructure.CleanupAttributesMigrationStep 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;
}
Aggregations