Search in sources :

Example 1 with FederationPomContributionMigrationStep

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

the class FederationPomContributionMigrationStepTestCase method pomContributionTest.

@Test
public void pomContributionTest() {
    MigrationReport reportMock = reportMock = mock(MigrationReport.class);
    PomModel pm = new PomModel();
    FederationPomContributionMigrationStep step = new FederationPomContributionMigrationStep();
    step.execute(pm, reportMock);
    assertThat(pm.getDependencies().size(), is(2));
    Dependency httpPolicyTransformExtension = pm.getDependencies().get(0);
    assertThat(httpPolicyTransformExtension.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
    assertThat(httpPolicyTransformExtension.getArtifactId(), is(MULE_HTTP_POLICY_TRANSFORM_EXTENSION_ARTIFACT_ID));
    assertThat(httpPolicyTransformExtension.getVersion(), is(notNullValue()));
    assertThat(httpPolicyTransformExtension.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
    Dependency federationExtensionDependency = pm.getDependencies().get(1);
    assertThat(federationExtensionDependency.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
    assertThat(federationExtensionDependency.getArtifactId(), is(MULE_FEDERATION_EXTENSION_ARTIFACT_ID));
    assertThat(federationExtensionDependency.getVersion(), is(notNullValue()));
    assertThat(federationExtensionDependency.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
}
Also used : FederationPomContributionMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.federation.FederationPomContributionMigrationStep) MigrationReport(com.mulesoft.tools.migration.step.category.MigrationReport) PomModel(com.mulesoft.tools.migration.project.model.pom.PomModel) Dependency(com.mulesoft.tools.migration.project.model.pom.Dependency) Test(org.junit.Test)

Aggregations

FederationPomContributionMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.federation.FederationPomContributionMigrationStep)1 Dependency (com.mulesoft.tools.migration.project.model.pom.Dependency)1 PomModel (com.mulesoft.tools.migration.project.model.pom.PomModel)1 MigrationReport (com.mulesoft.tools.migration.step.category.MigrationReport)1 Test (org.junit.Test)1