use of com.mulesoft.tools.migration.project.model.pom.Dependency in project mule-migration-assistant by mulesoft.
the class RamlValidatorPomContributionMigrationStepTestCase method pomContributionTestWithNoPreviousDependency.
@Test
public void pomContributionTestWithNoPreviousDependency() {
PomModel pm = new PomModel();
RamlValidatorPomContributionMigrationStep step = new RamlValidatorPomContributionMigrationStep();
step.execute(pm, mock(MigrationReport.class));
assertThat(pm.getDependencies().size(), is(1));
Dependency httpPolicyTransformExtension = pm.getDependencies().get(0);
assertThat(httpPolicyTransformExtension.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
assertThat(httpPolicyTransformExtension.getArtifactId(), is(MULE_REST_VALIDATOR_EXTENSION));
assertThat(httpPolicyTransformExtension.getVersion(), is(notNullValue()));
assertThat(httpPolicyTransformExtension.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
}
use of com.mulesoft.tools.migration.project.model.pom.Dependency in project mule-migration-assistant by mulesoft.
the class JsonPolicyTagMigrationStepTestCase method jsonPomContributionTest.
@Test
public void jsonPomContributionTest() {
JsonPolicyTagMigrationStep step = new JsonPolicyTagMigrationStep();
step.setApplicationModel(appModel);
Element element = appModel.getNode(XPATH_NODE_EXPRESSION);
step.execute(element, reportMock);
PomModel pm = appModel.getPomModel().get();
assertThat(pm.getDependencies().size(), is(1));
Dependency jsonThreatProtectionDependency = pm.getDependencies().get(0);
assertThat(jsonThreatProtectionDependency.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
assertThat(jsonThreatProtectionDependency.getArtifactId(), is(MULE_JSON_THREAT_PROTECTION_EXTENSION_ARTIFACT_ID));
assertThat(jsonThreatProtectionDependency.getVersion(), is(notNullValue()));
assertThat(jsonThreatProtectionDependency.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
assertJsonPolicyTag(element);
}
use of com.mulesoft.tools.migration.project.model.pom.Dependency in project mule-migration-assistant by mulesoft.
the class ThrottlingWithFileRenameMigrationTestCase method assertPomModel.
private void assertPomModel() {
PomModel pomModel = appModel.getPomModel().get();
assertThat(pomModel.getDependencies().size(), is(2));
Dependency httpTransformDependency = pomModel.getDependencies().get(0);
assertThat(httpTransformDependency.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
assertThat(httpTransformDependency.getArtifactId(), is(MULE_HTTP_POLICY_TRANSFORM_EXTENSION_ARTIFACT_ID));
assertThat(httpTransformDependency.getVersion(), is(notNullValue()));
assertThat(httpTransformDependency.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
Dependency policyTransformExtensionDependency = pomModel.getDependencies().get(1);
assertThat(policyTransformExtensionDependency.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
assertThat(policyTransformExtensionDependency.getArtifactId(), is(MULE_THROTTLING_EXTENSION_ARTIFACT_ID));
assertThat(policyTransformExtensionDependency.getVersion(), is(notNullValue()));
assertThat(policyTransformExtensionDependency.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
assertPomDeployProperties(pomModel);
}
use of com.mulesoft.tools.migration.project.model.pom.Dependency 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));
}
use of com.mulesoft.tools.migration.project.model.pom.Dependency in project mule-migration-assistant by mulesoft.
the class ProxyRequestHeadersProcessorMigrationStepTestCase method customProcessorPomContributionTest.
@Test
public void customProcessorPomContributionTest() throws Exception {
final ProxyResponseHeadersProcessorMigrationStep step = new ProxyResponseHeadersProcessorMigrationStep();
step.setApplicationModel(appModel);
step.execute(appModel.getNode(XPATH_NODE_EXPRESSION), reportMock);
PomModel pm = appModel.getPomModel().get();
assertThat(pm.getDependencies().size(), is(1));
Dependency customProcessorDependency = pm.getDependencies().get(0);
assertThat(customProcessorDependency.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
assertThat(customProcessorDependency.getArtifactId(), is(MULE_HTTP_PROXY_EXTENSION_ARTIFACT_ID));
assertThat(customProcessorDependency.getVersion(), is(notNullValue()));
assertThat(customProcessorDependency.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
}
Aggregations