Search in sources :

Example 1 with IpFilterTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep in project mule-migration-assistant by mulesoft.

the class IpFilterMigrationTask method getSteps.

@Override
public List<MigrationStep> getSteps() {
    IpFilterTagMigrationStep step = new IpFilterTagMigrationStep();
    step.setApplicationModel(getApplicationModel());
    return Arrays.asList(new IpFilterPomContributionMigrationStep(), step, new BlacklistTagMigrationStep(), new WhitelistTagMigrationStep(), new IpTagMigrationStep());
}
Also used : IpFilterTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep) IpFilterPomContributionMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterPomContributionMigrationStep) BlacklistTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.BlacklistTagMigrationStep) WhitelistTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.WhitelistTagMigrationStep) IpTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpTagMigrationStep)

Example 2 with IpFilterTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep in project mule-migration-assistant by mulesoft.

the class IpFilterTagMigrationStepTestCase method convertRawIpFilterTagWithNoProcessorChain.

@Test
public void convertRawIpFilterTagWithNoProcessorChain() {
    final IpFilterTagMigrationStep step = new IpFilterTagMigrationStep();
    Element element = getTestElement();
    step.execute(element, reportMock);
    assertFilterTag(element);
}
Also used : IpFilterTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep) Element(org.jdom2.Element) Test(org.junit.Test)

Example 3 with IpFilterTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep in project mule-migration-assistant by mulesoft.

the class IpFilterTagMigrationStepTestCase method convertIpFilterTagWithContentAndProcessorChain.

@Test
public void convertIpFilterTagWithContentAndProcessorChain() {
    final IpFilterTagMigrationStep step = new IpFilterTagMigrationStep();
    step.setApplicationModel(appModel);
    Element element = getTestElement().addContent(new Element(GENERIC_TAG_NAME, IP_FILTER_GW_NAMESPACE));
    addProcessorChainElement(element);
    step.execute(element, reportMock);
    assertFilterTag(element);
    Element ipsElement = (Element) element.getContent(0);
    assertThat(ipsElement.getContentSize(), is(0));
    assertDwlScript();
    assertProxyElement(element);
}
Also used : IpFilterTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep) Element(org.jdom2.Element) Test(org.junit.Test)

Example 4 with IpFilterTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep in project mule-migration-assistant by mulesoft.

the class IpFilterTagMigrationStepTestCase method convertIpFilterTagWithContentAndNoProcessorChain.

@Test
public void convertIpFilterTagWithContentAndNoProcessorChain() {
    final IpFilterTagMigrationStep step = new IpFilterTagMigrationStep();
    Element element = getTestElement().addContent(new Element(GENERIC_TAG_NAME, IP_FILTER_GW_NAMESPACE));
    step.execute(element, reportMock);
    assertFilterTag(element);
    Element ipsElement = (Element) element.getContent(0);
    assertThat(ipsElement.getContentSize(), is(0));
}
Also used : IpFilterTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep) Element(org.jdom2.Element) Test(org.junit.Test)

Example 5 with IpFilterTagMigrationStep

use of com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep in project mule-migration-assistant by mulesoft.

the class IpFilterTagMigrationStepTestCase method convertRawIpFilterTagWithProcessorChain.

@Test
public void convertRawIpFilterTagWithProcessorChain() {
    final IpFilterTagMigrationStep step = new IpFilterTagMigrationStep();
    step.setApplicationModel(appModel);
    Element element = getTestElement();
    addProcessorChainElement(element);
    step.execute(element, reportMock);
    assertFilterTag(element);
    assertDwlScript();
    assertProxyElement(element);
}
Also used : IpFilterTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep) Element(org.jdom2.Element) Test(org.junit.Test)

Aggregations

IpFilterTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterTagMigrationStep)5 Element (org.jdom2.Element)4 Test (org.junit.Test)4 BlacklistTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.BlacklistTagMigrationStep)1 IpFilterPomContributionMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpFilterPomContributionMigrationStep)1 IpTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.IpTagMigrationStep)1 WhitelistTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.ipfilter.WhitelistTagMigrationStep)1